Skip to content

Commit 6ce443c

Browse files
make a snippet string translatable
1 parent f87d0ef commit 6ce443c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

enigma-swing/src/main/java/org/quiltmc/enigma/gui/panel/DeclarationSnippetPanel.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
import org.quiltmc.enigma.gui.Gui;
4141
import org.quiltmc.enigma.gui.config.Config;
4242
import org.quiltmc.enigma.gui.highlight.BoxHighlightPainter;
43+
import org.quiltmc.enigma.util.I18n;
4344
import org.quiltmc.enigma.util.LineIndexer;
4445
import org.quiltmc.enigma.util.Result;
4546
import org.quiltmc.syntaxpain.LineNumbersRuler;
@@ -77,7 +78,7 @@ public DeclarationSnippetPanel(Gui gui, Entry<?> target, ClassHandle targetTopCl
7778
if (!this.isBounded()) {
7879
// the source isn't very useful if it couldn't be trimmed
7980
// set this text so it doesn't waste space or cause confusion
80-
this.editor.setText("// Unable to locate declaration");
81+
this.editor.setText("// " + I18n.translate("editor.snippet.message.no_declaration_found"));
8182
this.editor.getHighlighter().removeAllHighlights();
8283
} else {
8384
this.resolveTarget(source, target)

enigma/src/main/resources/lang/en_us.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@
157157
"editor.tooltip.label.from": "from",
158158
"editor.tooltip.label.inherited_from": "inherited from",
159159
"editor.tooltip.message.no_source": "No source available",
160+
"editor.snippet.message.no_declaration_found": "Unable to locate declaration",
160161

161162
"info_panel.identifier": "Identifier Info",
162163
"info_panel.identifier.none": "No identifier selected",

0 commit comments

Comments
 (0)