JAL-3141 Added i18n for the example filenames in Preferences
authorBen Soares <bsoares@dundee.ac.uk>
Wed, 9 Jan 2019 08:26:07 +0000 (08:26 +0000)
committerBen Soares <bsoares@dundee.ac.uk>
Wed, 9 Jan 2019 08:26:07 +0000 (08:26 +0000)
resources/lang/Messages.properties
resources/lang/Messages_es.properties
src/jalview/jbgui/GPreferences.java

index 3c32651..0dec27d 100644 (file)
@@ -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)
index 74d55f3..be8f6fe 100644 (file)
@@ -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)
index 7ee27d6..4477620 100755 (executable)
@@ -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);
+            }
           }
         }
       }