Skip to content

Commit

Permalink
Issue #10: More localization.
Browse files Browse the repository at this point in the history
  • Loading branch information
ottlinger committed Dec 21, 2015
1 parent 4209dd9 commit 61491db
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
6 changes: 2 additions & 4 deletions src/main/java/de/aikiit/fotorenamer/gui/HelpWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,8 @@ private void init() {
textfeld.setPage(HelpWindow.class.getResource(HTML_HELP_LOCATION));
oben.add(textfeld);
} catch (Exception e) {
oben.setLayout(new GridLayout(3, 1));
oben.add(new JLabel("Fehler in der Hilfe -"));
oben.add(new JLabel("" + e.getMessage()));
oben.add(new JLabel("" + e.getClass()));
oben.setLayout(new GridLayout(1, 1));
oben.add(new JLabel(String.format(LocalizationHelper.getBundleString("fotorenamer.ui.help.error"), e.getMessage(), e.getClass().getSimpleName())));
}

JScrollPane rollpanel = new JScrollPane(oben);
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/de/aikiit/fotorenamer/gui/MainUIWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import de.aikiit.fotorenamer.image.CreationDateFromExifImageRenamer;
import de.aikiit.fotorenamer.image.RemoveExifPrefixRenamer;
import de.aikiit.fotorenamer.util.ComponentGaugeUtil;
import de.aikiit.fotorenamer.util.LocalizationHelper;

import javax.swing.*;
import java.awt.*;
Expand Down Expand Up @@ -171,7 +172,7 @@ public final void actionPerformed(final ActionEvent event) {
Long.parseLong(
de.aikiit.fotorenamer.util.
Version.TIMESTAMP))),
"Versionsinfo",
LocalizationHelper.getBundleString("fotorenamer.ui.main.version.title"),
JOptionPane.INFORMATION_MESSAGE);
} else if (event.getSource() == this.revertButton || event.getSource()
== this.goButton) {
Expand Down Expand Up @@ -234,7 +235,6 @@ protected void done() {
};
// Execute the SwingWorker; GUI will not freeze
worker.execute();

}
}

Expand Down
9 changes: 9 additions & 0 deletions src/main/resources/fotorenamer.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ fotorenamer.ui.selector.select=Ausw\u00e4hlen
fotorenamer.ui.help.title=Programmhilfe
fotorenamer.ui.help.close=Schlie\u00dfen
fotorenamer.ui.help.close.mnemonic=S
# Replace with StringFormat
fotorenamer.ui.help.error=Fehler in der Hilfe - %s - %s

# MainUIWindow.java
fotorenamer.ui.main.version.title=Versionsinfo

# AbstractImageRenamer.java

# RemoveExifPrefixRenamer.java


# FIXME: problems with German Umlauts, http://www.utf8-zeichentabelle.de/unicode-utf8-table.pl
Expand Down

0 comments on commit 61491db

Please sign in to comment.