diff --git a/CHANGELOG.md b/CHANGELOG.md index 97c8a70..a6b2367 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ ### Fixed - AlreadyDisposedException on FileChangeListener after project dispose +- Request-URL limit for error reports ## [3.2.0] ### Added diff --git a/README.md b/README.md index 49b6c25..41d6de7 100644 --- a/README.md +++ b/README.md @@ -33,9 +33,9 @@ This plugin can be used for any project based on one of the formats and structur - UI Tool-Window which supports _tree-view_ and _table-view_ - Easily **`Add`** / **`Edit`** / **`Delete`** translations - Filter all translations with _full-text-search_ support -- Editor Assistance: Key completion, annotation and referencing +- Editor Assistance: translation intention, completion-contributor, key-annotation and -folding - Translation key sorting and nesting can be configured -- Configurable locales directory & preferred locale for ui presentation +- Extensive configuration options: locales directory, preferred locale, key delimiters - Missing language translations will be indicated red - Automatically reloads translation data if any locale file was changed @@ -48,6 +48,9 @@ This plugin can be used for any project based on one of the formats and structur - Modularized (**Locale** \ **Namespace**) - Modularized (**Namespace** \ **Locale**) +### Language Support +**JavaScript / TypeScript** - **Vue** - **Java** - **Kotlin** - **PHP** + ## Installation diff --git a/example/images/settings.PNG b/example/images/settings.PNG index 0630bd3..63a455f 100644 Binary files a/example/images/settings.PNG and b/example/images/settings.PNG differ diff --git a/src/main/java/de/marhali/easyi18n/service/ErrorReportHandler.java b/src/main/java/de/marhali/easyi18n/service/ErrorReportHandler.java index c5aa416..a050102 100644 --- a/src/main/java/de/marhali/easyi18n/service/ErrorReportHandler.java +++ b/src/main/java/de/marhali/easyi18n/service/ErrorReportHandler.java @@ -2,12 +2,15 @@ package de.marhali.easyi18n.service; import com.intellij.ide.BrowserUtil; import com.intellij.ide.DataManager; +import com.intellij.ide.plugins.IdeaPluginDescriptor; +import com.intellij.ide.plugins.PluginManagerCore; import com.intellij.openapi.actionSystem.CommonDataKeys; import com.intellij.openapi.actionSystem.DataContext; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.diagnostic.ErrorReportSubmitter; import com.intellij.openapi.diagnostic.IdeaLoggingEvent; import com.intellij.openapi.diagnostic.SubmittedReportInfo; +import com.intellij.openapi.extensions.PluginId; import com.intellij.openapi.progress.ProgressIndicator; import com.intellij.openapi.progress.Task; import com.intellij.openapi.project.Project; @@ -45,7 +48,14 @@ public class ErrorReportHandler extends ErrorReportSubmitter { DataContext context = mgr.getDataContext(parentComponent); Project project = CommonDataKeys.PROJECT.getData(context); - String title = "IDE Error Report"; + if(additionalInfo == null) { + additionalInfo = "/"; + } + + IdeaPluginDescriptor plugin = PluginManagerCore.getPlugin(PluginId.getId("de.marhali.easyi18n")); + String version = plugin != null ? plugin.getVersion() : "???"; + + String title = "IDE Error Report (v" + version + ")"; String labels = "ide report"; String body = "# Additional information\n" + additionalInfo + "\n" @@ -58,10 +68,16 @@ public class ErrorReportHandler extends ErrorReportSubmitter { String url = "https://github.com/marhali/easy-i18n/issues/new?title=" + encodeParam(title) + "&labels=" + encodeParam(labels) + "&body=" + encodeParam(body); + if(url.length() > 8201) { // Consider github request url limit + url = url.substring(0, 8201); + } + + String finalUrl = url; + new Task.Backgroundable(project, "Sending error report") { @Override public void run(@NotNull ProgressIndicator indicator) { - BrowserUtil.browse(url); + BrowserUtil.browse(finalUrl); ApplicationManager.getApplication().invokeLater(() -> consumer.consume(new SubmittedReportInfo(SubmittedReportInfo.SubmissionStatus.NEW_ISSUE)));