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:
jason@long.name 2013-06-15 12:41:46 +00:00
parent ef6b562553
commit 3138b04741

View file

@ -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()) {