better localisation support

This commit is contained in:
Jindra Petk
2013-07-08 21:30:02 +02:00
parent ef138b284f
commit 2dcf679546
31 changed files with 28 additions and 5 deletions

View File

@@ -18,8 +18,10 @@
<property name="INNOSETUPPATH" value="c:\program files (x86)\inno setup 5"/>
<property name="LAUNCH4JPATH" value="c:\program files (x86)\launch4j" />
<property name="MAXHEAPSIZE" value="1024"/> <!-- MB -->
<property name="SOURCEDIR" value="${basedir}/src"/>
<property name="LOCALESDIR" value="${SOURCEDIR}/com/jpexs/decompiler/flash/gui/locales"/>
<property name="RESOURCESDIR" value="${basedir}/resources"/>
<property name="TESTDIR" value="${basedir}/test"/>
<property name="TESTLIBDIR" value="${basedir}/testlib"/>
@@ -37,6 +39,7 @@
<property name="DISTLIBRARIESDIRNAME" value="lib"/>
<property name="JAVADOCDIR" value="${basedir}/javadoc"/>
<property name="ZIPNAME" value="ffdec_${VERSION}.zip"/>
<property name="LOCALESZIP" value="ffdec_${VERSION}_lang.zip"/>
<property name="INSTALLERCONFIG" value="${basedir}/installer.cfg"/>
<property name="INSTALLERPROJECT" value="${basedir}/installer.iss"/>

View File

@@ -175,6 +175,7 @@
</target>
<target name="release">
<antcall target="locales" />
<antcall target="archive" />
<antcall target="installer" />
</target>
@@ -193,6 +194,10 @@
</copy>
</target>
<target name="locales">
<zip destfile="${RELEASESDIR}/${LOCALESZIP}" basedir="${LOCALESDIR}" includes="**/*.properties"/>
</target>
<target name="build" depends="compile">
<mkdir dir="${DISTRIBUTIONDIR}"/>
<!-- <delete dir="${DISTLIBRARIESFULLDIR}"/> -->

View File

@@ -31,7 +31,7 @@ public class AboutDialog extends AppDialog {
public AboutDialog() {
setDefaultCloseOperation(HIDE_ON_CLOSE);
setSize(new Dimension(300, 270));
setSize(new Dimension(300, 320));
setTitle(translate("dialog.title"));
@@ -85,6 +85,15 @@ public class AboutDialog extends AppDialog {
wwwLabel.setHorizontalAlignment(SwingConstants.CENTER);
cp.add(wwwLabel);
JLabel transAuthorLabel = new JLabel(translate("translation.author.label"));
transAuthorLabel.setPreferredSize(new Dimension(300, 20));
transAuthorLabel.setHorizontalAlignment(SwingConstants.CENTER);
JLabel transAuthor = new JLabel(translate("translation.author"));
transAuthor.setPreferredSize(new Dimension(300, 20));
transAuthor.setHorizontalAlignment(SwingConstants.CENTER);
cp.add(transAuthorLabel);
cp.add(transAuthor);
JButton okButton = new JButton(translate("button.ok"));
cp.add(okButton);
okButton.addActionListener(new ActionListener() {

View File

@@ -32,7 +32,7 @@ public class AppStrings {
String name = cls.getName();
if (name.startsWith("com.jpexs.decompiler.flash.gui.")) {
name = name.substring("com.jpexs.decompiler.flash.gui.".length());
name = "com.jpexs.decompiler.flash.gui.resources." + name;
name = "com.jpexs.decompiler.flash.gui.locales." + name;
}
return name;
}

View File

@@ -16,4 +16,8 @@
version = version
by = by
button.ok = OK
dialog.title = About
dialog.title = About
#In the translation, replace "english" with target language name
translation.author.label = Author of english translation:
#In the translation, insert your name here
translation.author = JPEXS

View File

@@ -16,4 +16,6 @@
version = verze
by = autor:
button.ok = OK
dialog.title = O aplikaci
dialog.title = O aplikaci
translation.author.label = Autor \u010desk\u00e9ho p\u0159ekladu:
translation.author = JPEXS