Skip to content

Commit 6a4adfb

Browse files
committed
Merge pull request #2084 from voidplus/i18n
Internationalization (i18n)
2 parents 34182d0 + eb26ac5 commit 6a4adfb

24 files changed

+909
-926
lines changed

app/.settings/org.eclipse.jdt.core.prefs

Lines changed: 0 additions & 377 deletions
This file was deleted.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false

app/build.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
<include name="*.txt" />
2626
<include name="*.g" />
2727
<include name="*.smap" />
28+
<include name="*.properties" />
2829
</fileset>
2930
</delete>
3031
</target>
@@ -49,6 +50,14 @@
4950
message="Please build the core library first and make sure it sits in ../core/library/core.jar" />
5051

5152
<mkdir dir="bin" />
53+
54+
<!-- copy languages files -->
55+
<copy todir="bin">
56+
<fileset dir="src">
57+
<include name="processing/app/languages/*.properties" />
58+
</fileset>
59+
</copy>
60+
5261
<!-- in some cases, pde.jar was not getting built
5362
https://github.com/processing/processing/issues/1792 -->
5463
<delete file="pde.jar" />

app/src/processing/app/Base.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,10 @@ static private void createAndShowGUI(String[] args) {
170170

171171
// Make sure a full JDK is installed
172172
initRequirements();
173-
173+
174+
// Load the languages
175+
Language.init();
176+
174177
// run static initialization that grabs all the prefs
175178
Preferences.init();
176179

@@ -833,7 +836,8 @@ public void handleOpenPrompt() {
833836
extensions.add(mode.getDefaultExtension());
834837
}
835838

836-
final String prompt = "Open a Processing sketch...";
839+
840+
final String prompt = Language.text("open");
837841

838842
// don't use native dialogs on Linux (or anyone else w/ override)
839843
if (Preferences.getBoolean("chooser.files.native")) { //$NON-NLS-1$
@@ -2302,13 +2306,12 @@ static public int showYesNoCancelQuestion(Editor editor, String title,
23022306
"b { font: 13pt \"Lucida Grande\" }"+
23032307
"p { font: 11pt \"Lucida Grande\"; margin-top: 8px; width: 300px }"+
23042308
"</style> </head>" +
2305-
"<b>Do you want to save changes to this sketch<BR>" +
2306-
" before closing?</b>" +
2307-
"<p>If you don't save, your changes will be lost.",
2309+
"<b>" + Language.text("save.title") + "</b>" +
2310+
"<p>" + Language.text("save.hint") + "</p>",
23082311
JOptionPane.QUESTION_MESSAGE);
23092312

23102313
String[] options = new String[] {
2311-
"Save", "Cancel", "Don't Save"
2314+
Language.text("save.btn.save"), Language.text("prompt.cancel"), Language.text("save.btn.dont_save")
23122315
};
23132316
pane.setOptions(options);
23142317

0 commit comments

Comments
 (0)