diff options
author | Marko Živković <[email protected]> | 2015-02-26 20:31:17 +0000 |
---|---|---|
committer | Marko Živković <[email protected]> | 2015-02-26 20:31:17 +0000 |
commit | e5d505f0329e1ae048a1445c45b65cef8cd4e36b (patch) | |
tree | 324f0e59443344e73213599977a3e20ff623b51f /logo/src/xlogo/gui | |
parent | a25b730c4d6679dae2a2a9b0489b70b0fc75d992 (diff) |
Finished mapping of workspace config to JSON and back,
applied further refactorings
git-svn-id: https://svn.code.sf.net/p/xlogo4schools/svn/trunk@28 3b0d7934-f7ef-4143-9606-b51f2e2281fd
Diffstat (limited to 'logo/src/xlogo/gui')
-rw-r--r-- | logo/src/xlogo/gui/Traduc.java | 6 | ||||
-rw-r--r-- | logo/src/xlogo/gui/translation/MyTable.java | 2 | ||||
-rw-r--r-- | logo/src/xlogo/gui/translation/TranslateXLogo.java | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/logo/src/xlogo/gui/Traduc.java b/logo/src/xlogo/gui/Traduc.java index 93b6234..7fa1b3c 100644 --- a/logo/src/xlogo/gui/Traduc.java +++ b/logo/src/xlogo/gui/Traduc.java @@ -172,10 +172,10 @@ public class Traduc extends JFrame implements ActionListener { } // ajout des mots clés pour et fin int id=combo_origine.getSelectedIndex(); - Locale locale=Language.getLanguage(id).getLocale(); + Locale locale=Language.valueOf(id).getLocale(); ResourceBundle res1=ResourceBundle.getBundle("langage",locale); id=combo_destination.getSelectedIndex(); - locale=Language.getLanguage(id).getLocale(); + locale=Language.valueOf(id).getLocale(); ResourceBundle res2=ResourceBundle.getBundle("langage",locale); tre.put(res1.getString("pour"),res2.getString("pour")); tre.put(res1.getString("fin"),res2.getString("fin")); @@ -210,7 +210,7 @@ public class Traduc extends JFrame implements ActionListener { private ResourceBundle genere_langue(JComboBox jc){ // fixe la langue utilisée pour les messages Locale locale=null; int id=jc.getSelectedIndex(); - locale=Language.getLanguage(id).getLocale(); + locale=Language.valueOf(id).getLocale(); return ResourceBundle.getBundle("primitives",locale); } } diff --git a/logo/src/xlogo/gui/translation/MyTable.java b/logo/src/xlogo/gui/translation/MyTable.java index cd8c410..d24dd2c 100644 --- a/logo/src/xlogo/gui/translation/MyTable.java +++ b/logo/src/xlogo/gui/translation/MyTable.java @@ -261,7 +261,7 @@ public class MyTable extends JPanel implements Searchable{ ResourceBundle[] rb=new ResourceBundle[getColumnCount()]; // initialize all ResourceBundle for(int i=0;i<getColumnCount();i++){ - Locale locale = Language.getLanguage(i).getLocale(); + Locale locale = Language.valueOf(i).getLocale(); // In CREATE Mode, when i=getColumnCount(), the last locale is null if (null==locale) break; rb[i] = ResourceBundle.getBundle(bundle, locale); diff --git a/logo/src/xlogo/gui/translation/TranslateXLogo.java b/logo/src/xlogo/gui/translation/TranslateXLogo.java index 2206f8d..db4b5ac 100644 --- a/logo/src/xlogo/gui/translation/TranslateXLogo.java +++ b/logo/src/xlogo/gui/translation/TranslateXLogo.java @@ -111,10 +111,10 @@ public class TranslateXLogo extends JFrame implements ActionListener { try { Locale locale=null; if (action.equals(TranslateXLogo.CREATE)){ - locale = Language.getLanguage(0).getLocale(); + locale = Language.valueOf(0).getLocale(); } else if (!action.equals(TranslateXLogo.CONSULT)){ - locale = Language.getLanguage(Integer.parseInt(id)).getLocale(); + locale = Language.valueOf(Integer.parseInt(id)).getLocale(); } java.util.Vector<String> v=bottom.getPrimTable().getKeys(); ResourceBundle rb = ResourceBundle.getBundle("primitives", locale); |