From: Ben Soares Date: Wed, 9 Jan 2019 08:26:07 +0000 (+0000) Subject: JAL-3141 Added i18n for the example filenames in Preferences X-Git-Tag: Release_2_11_0~17^2~97^2~36 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=fbe3e90a9629de09b83db68d7c1e4b820825317e;p=jalview.git JAL-3141 Added i18n for the example filenames in Preferences --- diff --git a/resources/lang/Messages.properties b/resources/lang/Messages.properties index 3c32651..0dec27d 100644 --- a/resources/lang/Messages.properties +++ b/resources/lang/Messages.properties @@ -1384,3 +1384,6 @@ label.keep_only_this_number_of_backup_files = Keep only this number of most rece label.old_backup_files = Old backup files: label.confirm_delete = Confirm deletions label.auto_delete = Automatically delete +label.filename = filename +label.braced_oldest = (oldest) +label.braced_newest = (most recent) diff --git a/resources/lang/Messages_es.properties b/resources/lang/Messages_es.properties index 74d55f3..be8f6fe 100644 --- a/resources/lang/Messages_es.properties +++ b/resources/lang/Messages_es.properties @@ -1386,3 +1386,6 @@ label.keep_only_this_number_of_backup_files = Mantenga solo este n label.old_backup_files = Viejos archivos de copia de seguridad: label.confirm_delete = Confirmar eliminaciones label.auto_delete = Eliminar automáticamente +label.filename = nombre_de_archivo +label.braced_oldest = (mas antigua) +label.braced_newest = (mas nueva) diff --git a/src/jalview/jbgui/GPreferences.java b/src/jalview/jbgui/GPreferences.java index 7ee27d6..4477620 100755 --- a/src/jalview/jbgui/GPreferences.java +++ b/src/jalview/jbgui/GPreferences.java @@ -2022,7 +2022,11 @@ public class GPreferences extends JPanel protected void updateBackupFilesExampleLabel() { int exampleindex = 12; - String base = "filename"; + String base = MessageManager.getString("label.filename"); + if (base == null || base.length() > 0) + { + base = "filename"; + } String extension = ".fa"; String suffix = suffixTemplate.getText(); @@ -2086,11 +2090,19 @@ public class GPreferences extends JPanel } else if (index == min) { - exampleSB.append(" (most recent)"); + String newest = MessageManager.getString("label.braced_newest"); + if (newest != null && newest.length() > 0) + { + exampleSB.append(" "+newest); + } } else if (index == max) { - exampleSB.append(" (oldest)"); + String oldest = MessageManager.getString("label.braced_oldest"); + if (oldest != null && oldest.length() > 0) + { + exampleSB.append(" "+oldest); + } } } } @@ -2131,11 +2143,19 @@ public class GPreferences extends JPanel } else if (index == min) { - exampleSB.append(" (oldest)"); + String oldest = MessageManager.getString("label.braced_oldest"); + if (oldest != null && oldest.length() > 0) + { + exampleSB.append(" "+oldest); + } } else if (index == max) { - exampleSB.append(" (most recent)"); + String newest = MessageManager.getString("label.braced_newest"); + if (newest != null && newest.length() > 0) + { + exampleSB.append(" "+newest); + } } } }