From 5a286d58e740f1aa5944488c602f5abc1318f6ca Mon Sep 17 00:00:00 2001 From: 2xsaiko Date: Wed, 3 Jun 2020 20:16:10 +0200 Subject: Editor tabs (#238) * Split into modules * Add validation utils from patch-1 branch * Tabs, iteration 1 * Delete RefreshMode * Load initial code asynchronously * Formatting * Don't do anything when close() gets called multiple times * Add scroll pane to editor * Fix getActiveEditor() * Rename components to more descriptive editorScrollPanes * Move ClassHandle and related types out of gui package * Fix tab title bar and other files not updating when changing mappings * Fix compilation errors * Start adding renaming functionality to new panel * Scale validation error marker * Make most user input validation use ValidationContext * Fix line numbers not displaying * Move CodeReader.navigateToToken into PanelEditor * Add close button on tabs * Remove TODO, it's fast enough * Remove JS script action for 2 seconds faster startup * Add comment on why the action is removed * ClassHandle/ClassHandleProvider documentation * Fix language file formatting * Bulk tab closing operations * Fix crash when renaming class and not connected to server * Fix caret jumping to the end of the file when opening * Increase identifier panel size * Make popup menu text translatable * Fix formatting * Fix compilation issues * CovertTextField -> ConvertingTextField * Retain formatting using spaces * Add de_de.json * Better decompilation error handling * Fix some caret related NPEs * Localization * Close editor on classhandle delete & fix onInvalidate not running on the Swing thread * Fix crash when trying to close a tab from onDeleted class handle listener Co-authored-by: Runemoro --- enigma/src/main/resources/lang/de_de.json | 26 ++++++++++++++++++++++++++ enigma/src/main/resources/lang/en_us.json | 27 ++++++++++++++++++++++++--- 2 files changed, 50 insertions(+), 3 deletions(-) create mode 100644 enigma/src/main/resources/lang/de_de.json (limited to 'enigma/src/main/resources') diff --git a/enigma/src/main/resources/lang/de_de.json b/enigma/src/main/resources/lang/de_de.json new file mode 100644 index 0000000..ef41da1 --- /dev/null +++ b/enigma/src/main/resources/lang/de_de.json @@ -0,0 +1,26 @@ +{ + "language": "German", + + "general.retry": "Wiederholen", + + "popup_menu.editor_tab.close": "Schließen", + "popup_menu.editor_tab.close_all": "Alle schließen", + "popup_menu.editor_tab.close_others": "Andere schließen", + "popup_menu.editor_tab.close_left": "Alle links hiervon schließen", + "popup_menu.editor_tab.close_right": "Alle rechts hiervon schließen", + + "editor.decompiling": "Dekompiliere...", + "editor.decompile_error": "Ein Fehler ist während des Dekompilierens aufgetreten.", + + "validation.message.empty_field": "Dieses Feld muss ausgefüllt werden.", + "validation.message.not_int": "Wert muss eine ganze Zahl sein.", + "validation.message.field_out_of_range_int": "Wert muss eine ganze Zahl zwischen %d und %d sein.", + "validation.message.field_length_out_of_range": "Wert muss kürzer als %d Zeichen sein.", + "validation.message.nonunique_name_class": "Name „%s“ ist in „%s“ nicht eindeutig.", + "validation.message.nonunique_name": "Name „%s“ ist nicht eindeutig.", + "validation.message.illegal_class_name": "„%s“ ist kein gültiger Klassenname.", + "validation.message.illegal_identifier": "„%s“ ist kein gültiger Name.", + "validation.message.illegal_identifier.long": "Ungültiges Zeichen „%2$s“ an Position %3$d.", + "validation.message.illegal_doc_comment_end": "Javadoc-Kommentar darf die Zeichenfolge „*/“ nicht enthalten.", + "validation.message.reserved_identifier": "„%s“ ist ein reservierter Name." +} \ No newline at end of file diff --git a/enigma/src/main/resources/lang/en_us.json b/enigma/src/main/resources/lang/en_us.json index dbf4b93..b8db4b0 100644 --- a/enigma/src/main/resources/lang/en_us.json +++ b/enigma/src/main/resources/lang/en_us.json @@ -1,6 +1,8 @@ { "language": "English", + "general.retry": "Retry", + "mapping_format.enigma_file": "Enigma File", "mapping_format.enigma_directory": "Enigma Directory", "mapping_format.enigma_zip": "Enigma ZIP", @@ -69,6 +71,14 @@ "popup_menu.zoom.in": "Zoom in", "popup_menu.zoom.out": "Zoom out", "popup_menu.zoom.reset": "Reset zoom", + "popup_menu.editor_tab.close": "Close", + "popup_menu.editor_tab.close_all": "Close All", + "popup_menu.editor_tab.close_others": "Close Others", + "popup_menu.editor_tab.close_left": "Close All to the Left", + "popup_menu.editor_tab.close_right": "Close All to the Right", + + "editor.decompiling": "Decompiling...", + "editor.decompile_error": "An error was encountered while decompiling.", "info_panel.classes.obfuscated": "Obfuscated Classes", "info_panel.classes.deobfuscated": "De-obfuscated Classes", @@ -79,8 +89,8 @@ "info_panel.identifier.method": "Method", "info_panel.identifier.constructor": "Constructor", "info_panel.identifier.class": "Class", - "info_panel.identifier.type_descriptor": "TypeDescriptor", - "info_panel.identifier.method_descriptor": "MethodDescriptor", + "info_panel.identifier.type_descriptor": "Type Descriptor", + "info_panel.identifier.method_descriptor": "Method Descriptor", "info_panel.identifier.modifier": "Modifier", "info_panel.identifier.index": "Index", "info_panel.editor.class.decompiling": "(decompiling...)", @@ -149,12 +159,23 @@ "message.mark_deobf.text": "%s marked %s as deobfuscated", "message.remove_mapping.text": "%s removed mappings for %s", "message.rename.text": "%s renamed %s to %s", - "status.disconnected": "Disconnected.", "status.connected": "Connected.", "status.connected_user_count": "Connected (%d users).", "status.ready": "Ready.", + "validation.message.empty_field": "This field is required.", + "validation.message.not_int": "Value must be an integer.", + "validation.message.field_out_of_range_int": "Value must be an integer between %d and %d.", + "validation.message.field_length_out_of_range": "Value must be less than %d characters long.", + "validation.message.nonunique_name_class": "Name '%s' is not unique in '%s'.", + "validation.message.nonunique_name": "Name '%s' is not unique.", + "validation.message.illegal_class_name": "'%s' is not a valid class name.", + "validation.message.illegal_identifier": "'%s' is not a valid identifier.", + "validation.message.illegal_identifier.long": "Invalid character '%2$s' at position %3$d.", + "validation.message.illegal_doc_comment_end": "Javadoc comment cannot contain the character sequence '*/'.", + "validation.message.reserved_identifier": "'%s' is a reserved identifier.", + "crash.title": "%s - Crash Report", "crash.summary": "%s has crashed! =(", "crash.export": "Export", -- cgit v1.2.3