Skip to content

Commit

Permalink
Make legacy suffix translatable
Browse files Browse the repository at this point in the history
  • Loading branch information
NebelNidas committed Aug 24, 2024
1 parent 329dbcb commit 4f39292
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -415,9 +415,11 @@ private static void prepareOpenMappingsMenu(JMenu openMappingsMenu, Gui gui) {
openMappingsMenu.addSeparator();

// Enigma's own readers
String legacySuffix = " (" + I18n.translate("legacy") + ")";

for (MappingFormat format : MappingFormat.values()) {
if (format.getReader() != null) {
addOpenMappingsMenuEntry(I18n.translate("mapping_format." + format.name().toLowerCase(Locale.ROOT)) + " (legacy)",
addOpenMappingsMenuEntry(I18n.translate("mapping_format." + format.name().toLowerCase(Locale.ROOT)) + legacySuffix,
format, false, openMappingsMenu, gui);
}
}
Expand Down Expand Up @@ -450,9 +452,11 @@ private static void prepareSaveMappingsAsMenu(JMenu saveMappingsAsMenu, JMenuIte
saveMappingsAsMenu.addSeparator();

// Enigma's own writers
String legacySuffix = " (" + I18n.translate("legacy") + ")";

for (MappingFormat format : MappingFormat.values()) {
if (format.getWriter() != null) {
addSaveMappingsAsMenuEntry(I18n.translate("mapping_format." + format.name().toLowerCase(Locale.ROOT)) + " (legacy)",
addSaveMappingsAsMenuEntry(I18n.translate("mapping_format." + format.name().toLowerCase(Locale.ROOT)) + legacySuffix,
format, false, saveMappingsAsMenu, saveMappingsItem, gui);
}
}
Expand Down

0 comments on commit 4f39292

Please sign in to comment.