translation tool: if language already has translated strings, load them
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@690 d9718cc8-9f43-0410-858b-315f434eb58c
This commit is contained in:
parent
ef6b562553
commit
3138b04741
1 changed files with 7 additions and 2 deletions
|
@ -157,8 +157,13 @@ class StringsModel extends AbstractTableModel
|
|||
for (String file : FILES)
|
||||
{
|
||||
Properties p = new Properties();
|
||||
if (localeCode == null) {
|
||||
p.load(getClass().getResourceAsStream("/micropolisj/"+file+".properties"));
|
||||
{
|
||||
// load strings from our jar file
|
||||
String s = "/micropolisj/"+file+(localeCode != null ? "_"+localeCode : "") + ".properties";
|
||||
InputStream in = getClass().getResourceAsStream(s);
|
||||
if (in != null) {
|
||||
p.load(in);
|
||||
}
|
||||
}
|
||||
File f = getPFile(file, localeCode);
|
||||
if (f.exists()) {
|
||||
|
|
Reference in a new issue