Skip to content

Commit 7be7251

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 0d3c09b + 3f471fc commit 7be7251

311 files changed

Lines changed: 25002 additions & 19304 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

app/src/processing/app/ColorChooser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ public void paintComponent(Graphics g) {
448448
} else {
449449
row.add(createFixedLabel(""));
450450
}
451-
button = new JButton("Cancel");
451+
button = new JButton(Language.text("prompt.cancel"));
452452
button.addActionListener(new ActionListener() {
453453

454454
@Override

app/src/processing/app/Editor.java

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1358,8 +1358,14 @@ protected void updateUndoState() {
13581358
if (undo.canUndo() || compoundEdit != null && compoundEdit.isInProgress()) {
13591359
this.setEnabled(true);
13601360
undoItem.setEnabled(true);
1361-
undoItem.setText(undo.getUndoPresentationName());
1362-
putValue(Action.NAME, undo.getUndoPresentationName());
1361+
String newUndoPresentationName = Language.text("menu.edit.undo");
1362+
if (undo.getUndoPresentationName().equals("Undo addition")) {
1363+
newUndoPresentationName += " "+Language.text("menu.edit.action.addition");
1364+
} else if (undo.getUndoPresentationName().equals("Undo deletion")) {
1365+
newUndoPresentationName += " "+Language.text("menu.edit.action.deletion");
1366+
}
1367+
undoItem.setText(newUndoPresentationName);
1368+
putValue(Action.NAME, newUndoPresentationName);
13631369
// if (sketch != null) {
13641370
// sketch.setModified(true); // 0107, removed for 0196
13651371
// }
@@ -1407,8 +1413,14 @@ public void actionPerformed(ActionEvent e) {
14071413
protected void updateRedoState() {
14081414
if (undo.canRedo()) {
14091415
redoItem.setEnabled(true);
1410-
redoItem.setText(undo.getRedoPresentationName());
1411-
putValue(Action.NAME, undo.getRedoPresentationName());
1416+
String newRedoPresentationName = Language.text("menu.edit.redo");
1417+
if (undo.getRedoPresentationName().equals("Redo addition")) {
1418+
newRedoPresentationName += " "+Language.text("menu.edit.action.addition");
1419+
} else if (undo.getRedoPresentationName().equals("Redo deletion")) {
1420+
newRedoPresentationName += " "+Language.text("menu.edit.action.deletion");
1421+
}
1422+
redoItem.setText(newRedoPresentationName);
1423+
putValue(Action.NAME, newRedoPresentationName);
14121424
} else {
14131425
this.setEnabled(false);
14141426
redoItem.setEnabled(false);

app/src/processing/app/Language.java

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ private Language() {
7676
languages.put(code, Locale.forLanguageTag(code).getDisplayLanguage(Locale.forLanguageTag(code)));
7777
}
7878

79+
boolean copiedLangFiles = false;
80+
7981
if(loadProps()){
8082

8183
boolean updateProps = false;
@@ -92,7 +94,7 @@ private Language() {
9294

9395
// Copy new language properties
9496
if(updateLangFiles){
95-
if(updateLangFiles()){
97+
if(copiedLangFiles = updateLangFiles()){
9698
props.setProperty("version", version);
9799
updateProps = true;
98100
}
@@ -113,6 +115,15 @@ private Language() {
113115
if(updateProps){
114116
updateProps();
115117
}
118+
119+
} else {
120+
// Fallback: No access to the property file
121+
copiedLangFiles = updateLangFiles();
122+
}
123+
124+
// Developing
125+
if (Base.DEBUG && copiedLangFiles == false) {
126+
updateLangFiles();
116127
}
117128

118129
try {
@@ -172,9 +183,8 @@ static private String[] listSupported() {
172183
"nl", // Dutch, Nederlands
173184
"pt", // Portuguese
174185
"tr", // Turkish
175-
"zh" // chinese
186+
"zh" // Chinese
176187
};
177-
178188
Arrays.sort(SUPPORTED);
179189
return SUPPORTED;
180190

@@ -267,7 +277,7 @@ static public void saveLanguage(String language) {
267277
/** Singleton constructor */
268278
static public Language init() {
269279
if (instance == null) {
270-
synchronized(Language.class) {
280+
synchronized (Language.class) {
271281
if (instance == null) {
272282
instance = new Language();
273283
}

app/src/processing/app/Sketch.java

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -281,10 +281,8 @@ public void handleNewCode() {
281281
// if read-only, give an error
282282
if (isReadOnly()) {
283283
// if the files are read-only, need to first do a "save as".
284-
Base.showMessage("Sketch is Read-Only",
285-
"Some files are marked \"read-only\", so you'll\n" +
286-
"need to re-save the sketch in another location,\n" +
287-
"and try again.");
284+
Base.showMessage(Language.text("new.messages.is_read_only"),
285+
Language.text("new.messages.is_read_only.description"));
288286
return;
289287
}
290288

@@ -302,24 +300,22 @@ public void handleRenameCode() {
302300
ensureExistence();
303301

304302
if (currentIndex == 0 && isUntitled()) {
305-
Base.showMessage("Sketch is Untitled",
306-
"How about saving the sketch first \n" +
307-
"before trying to rename it?");
303+
Base.showMessage(Language.text("rename.messages.is_untitled"),
304+
Language.text("rename.messages.is_untitled.description"));
308305
return;
309306
}
310307

311308
if (isModified()) {
312-
Base.showMessage("Save", "Please save the sketch before renaming.");
309+
Base.showMessage(Language.text("menu.file.save"),
310+
Language.text("rename.messages.is_modified"));
313311
return;
314312
}
315313

316314
// if read-only, give an error
317315
if (isReadOnly()) {
318316
// if the files are read-only, need to first do a "save as".
319-
Base.showMessage("Sketch is Read-Only",
320-
"Some files are marked \"read-only\", so you'll\n" +
321-
"need to re-save the sketch in another location,\n" +
322-
"and try again.");
317+
Base.showMessage(Language.text("rename.messages.is_read_only"),
318+
Language.text("rename.messages.is_read_only.description"));
323319
return;
324320
}
325321

@@ -619,17 +615,15 @@ public void handleDeleteCode() {
619615
// if read-only, give an error
620616
if (isReadOnly()) {
621617
// if the files are read-only, need to first do a "save as".
622-
Base.showMessage("Sketch is Read-Only",
623-
"Some files are marked \"read-only\", so you'll\n" +
624-
"need to re-save the sketch in another location,\n" +
625-
"and try again.");
618+
Base.showMessage(Language.text("delete.messages.is_read_only"),
619+
Language.text("delete.messages.is_read_only.description"));
626620
return;
627621
}
628622

629623
// don't allow if untitled
630624
if (currentIndex == 0 && isUntitled()) {
631-
Base.showMessage("Cannot Delete",
632-
"You can't delete a sketch that has not been saved.");
625+
Base.showMessage(Language.text("delete.messages.cannot_delete"),
626+
Language.text("delete.messages.cannot_delete.description"));
633627
return;
634628
}
635629

@@ -665,8 +659,8 @@ public void handleDeleteCode() {
665659
} else {
666660
// delete the file
667661
if (!current.deleteFile()) {
668-
Base.showMessage("Couldn't do it",
669-
"Could not delete \"" +
662+
Base.showMessage(Language.text("delete.messages.cannot_delete.file"),
663+
Language.text("delete.messages.cannot_delete.file.description")+" \"" +
670664
current.getFileName() + "\".");
671665
return;
672666
}

app/src/processing/app/contrib/AvailableContribution.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* -*- mode: java; c-basic-offset: 2; indent-tabs-mode: nil -*- */
1+
/* -*- mode: java; c-basic-offset: 2; indent-tabs-mode: nil -*- */
22

33
/*
44
Part of the Processing project - http://processing.org

app/src/processing/app/contrib/LocalContribution.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* -*- mode: java; c-basic-offset: 2; indent-tabs-mode: nil -*- */
1+
/* -*- mode: java; c-basic-offset: 2; indent-tabs-mode: nil -*- */
22

33
/*
44
Part of the Processing project - http://processing.org

app/src/processing/mode/java/JavaEditor.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -233,17 +233,17 @@ public void handleExportApplication() {
233233
// toolbar.activate(JavaToolbar.EXPORT);
234234

235235
if (handleExportCheckModified()) {
236-
statusNotice("Exporting application...");
236+
statusNotice(Language.text("export.notice.exporting"));
237237
try {
238238
if (exportApplicationPrompt()) {
239239
Base.openFolder(sketch.getFolder());
240-
statusNotice("Done exporting.");
240+
statusNotice(Language.text("export.notice.exporting.done"));
241241
} else {
242242
// error message will already be visible
243243
// or there was no error, in which case it was canceled.
244244
}
245245
} catch (Exception e) {
246-
statusNotice("Error during export.");
246+
statusNotice(Language.text("export.notice.exporting.error"));
247247
e.printStackTrace();
248248
}
249249
}
@@ -302,7 +302,7 @@ public void itemStateChanged(ItemEvent e) {
302302
});
303303
if (!Base.isMacOS()) {
304304
macosxButton.setEnabled(false);
305-
macosxButton.setToolTipText("Mac OS X export is only available on Mac OS X");
305+
macosxButton.setToolTipText(Language.text("export.tooltip.macosx"));
306306
}
307307

308308
final JCheckBox linuxButton = new JCheckBox("Linux");
@@ -399,7 +399,7 @@ public void paintComponent(Graphics g) {
399399
//presentPanel.add(showStopButton);
400400
// presentPanel.add(Box.createHorizontalStrut(10));
401401
// presentPanel.add(Box.createHorizontalGlue());
402-
presentPanel.setBorder(new TitledBorder("Full Screen"));
402+
presentPanel.setBorder(new TitledBorder(Language.text("export.full_screen")));
403403
// wide = Math.max(wide, platformPanel.getPreferredSize().width);
404404
presentPanel.setAlignmentX(Component.LEFT_ALIGNMENT);
405405
panel.add(presentPanel);
@@ -448,7 +448,7 @@ public void mousePressed(MouseEvent event) {
448448
warningLabel.setBorder(new EmptyBorder(3, 13 + indent, 3, 13));
449449

450450
final JCheckBox embedJavaButton =
451-
new JCheckBox("Embed Java for " + platformName);
451+
new JCheckBox(Language.text("export.embed_java.for") + " " + platformName);
452452
embedJavaButton.setSelected(embed);
453453
embedJavaButton.addItemListener(new ItemListener() {
454454
public void itemStateChanged(ItemEvent e) {
@@ -465,15 +465,15 @@ public void itemStateChanged(ItemEvent e) {
465465

466466
embedPanel.add(embedJavaButton);
467467
embedPanel.add(warningLabel);
468-
embedPanel.setBorder(new TitledBorder("Embed Java"));
468+
embedPanel.setBorder(new TitledBorder(Language.text("export.embed_java")));
469469
panel.add(embedPanel);
470470

471471
//
472472

473473
if (Base.isMacOS()) {
474474
JPanel signPanel = new JPanel();
475475
signPanel.setLayout(new BoxLayout(signPanel, BoxLayout.Y_AXIS));
476-
signPanel.setBorder(new TitledBorder("Code Signing"));
476+
signPanel.setBorder(new TitledBorder(Language.text("export.code_signing")));
477477

478478
// gatekeeper: http://support.apple.com/kb/ht5290
479479
// for developers: https://developer.apple.com/developer-id/
@@ -579,7 +579,7 @@ public void propertyChange(PropertyChangeEvent e) {
579579
return jmode.handleExportApplication(sketch);
580580
} else if (value.equals(options[1]) || value.equals(Integer.valueOf(-1))) {
581581
// closed window by hitting Cancel or ESC
582-
statusNotice("Export to Application canceled.");
582+
statusNotice(Language.text("export.notice.exporting.cancel"));
583583
}
584584
return false;
585585
}
@@ -633,7 +633,7 @@ public ColorPreference(String pref) {
633633
addMouseListener(new MouseAdapter() {
634634
public void mouseReleased(MouseEvent e) {
635635
Color color = Preferences.getColor(prefName);
636-
chooser = new ColorChooser(JavaEditor.this, true, color, "Select", ColorPreference.this);
636+
chooser = new ColorChooser(JavaEditor.this, true, color, Language.text("color_chooser.select"), ColorPreference.this);
637637
chooser.show();
638638
}
639639
});
@@ -679,8 +679,8 @@ protected boolean handleExportCheckModified() {
679679
if (sketch.isModified()) {
680680
Object[] options = { Language.text("prompt.ok"), Language.text("prompt.cancel") };
681681
int result = JOptionPane.showOptionDialog(this,
682-
"Save changes before export?",
683-
"Save",
682+
Language.text("export.unsaved_changes"),
683+
Language.text("menu.file.save"),
684684
JOptionPane.OK_CANCEL_OPTION,
685685
JOptionPane.QUESTION_MESSAGE,
686686
null,
@@ -694,7 +694,7 @@ protected boolean handleExportCheckModified() {
694694
// why it's not CANCEL_OPTION is beyond me (at least on the mac)
695695
// but f-- it.. let's get this shite done..
696696
//} else if (result == JOptionPane.CANCEL_OPTION) {
697-
statusNotice("Export canceled, changes must first be saved.");
697+
statusNotice(Language.text("export.notice.cancel.unsaved_changes"));
698698
//toolbar.clear();
699699
return false;
700700
}

build/build.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -926,6 +926,8 @@ remove the spaces for depth since it should be double dash, but screws up commen
926926
<!-- prevent files from always appearing to have changed -->
927927
<arg value="-notimestamp" />
928928

929+
<arg value="-quiet" />
930+
929931
<packageset dir="../core/src">
930932
<include name="processing/**" />
931933
</packageset>
@@ -944,10 +946,12 @@ remove the spaces for depth since it should be double dash, but screws up commen
944946
<arg line="everything -type f -exec rm -rf {} ';'" />
945947
</exec>
946948

947-
<javadoc access="public" author="false" classpath="../java/libraries/video/library/jna.jar:../java/libraries/serial/bin:lib/antlr.jar:../core/library/jogl-all.jar:../java/libraries/video/bin:lib/apple.jar:lib/jna.jar:lib/ant-launcher.jar:../java/libraries/pdf/bin:lib/ant.jar:../core/bin:../java/libraries/pdf/library/itext.jar:../java/libraries/video/library/gstreamer-java.jar:lib/org-netbeans-swing-outline.jar:../java/libraries/dxf/bin:bin:../java/libraries/net/bin:../java/libraries/serial/library/jssc.jar:../core/library/gluegen-rt.jar:${java.home}/lib/tools.jar" destdir="javadoc/everything" nodeprecated="false" nodeprecatedlist="false" noindex="false" nonavbar="false" notree="false" source="1.7" splitindex="false" use="false" version="false" noqualifier="all">
949+
<javadoc access="public" author="false" classpath="../app/lib/ant.jar:../app/lib/ant-launcher.jar:../app/lib/antlr.jar:../app/lib/apple.jar:../app/lib/jna.jar:../app/lib/org-netbeans-swing-outline.jar:../core/bin:../core/library/gluegen-rt.jar:../core/library/jogl-all.jar:../java/libraries/pdf/bin:../java/libraries/pdf/library/itext.jar:../java/libraries/dxf/bin:../java/libraries/net/bin:../java/libraries/serial/bin:../java/mode/ecj.jar:${java.home}/lib/tools.jar" destdir="javadoc/everything" nodeprecated="false" nodeprecatedlist="false" noindex="false" nonavbar="false" notree="false" source="1.7" splitindex="false" use="false" version="false" noqualifier="all">
948950

949951
<arg value="-notimestamp" />
950952

953+
<arg value="-quiet" />
954+
951955
<link href="http://docs.oracle.com/javase/7/docs/api/" />
952956

953957
<packageset dir="../app/src">

build/javadoc/core/allclasses-frame.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ <h1 class="bar">All Classes</h1>
4343
<li><a href="processing/core/PShapeOBJ.html" title="class in processing.core" target="classFrame">PShapeOBJ</a></li>
4444
<li><a href="processing/opengl/PShapeOpenGL.html" title="class in processing.opengl" target="classFrame">PShapeOpenGL</a></li>
4545
<li><a href="processing/core/PShapeSVG.html" title="class in processing.core" target="classFrame">PShapeSVG</a></li>
46+
<li><a href="processing/core/PShapeSVG.Font.html" title="class in processing.core" target="classFrame">PShapeSVG.Font</a></li>
47+
<li><a href="processing/core/PShapeSVG.FontGlyph.html" title="class in processing.core" target="classFrame">PShapeSVG.FontGlyph</a></li>
4648
<li><a href="processing/core/PStyle.html" title="class in processing.core" target="classFrame">PStyle</a></li>
4749
<li><a href="processing/core/PVector.html" title="class in processing.core" target="classFrame">PVector</a></li>
4850
<li><a href="processing/data/Sort.html" title="class in processing.data" target="classFrame">Sort</a></li>

build/javadoc/core/allclasses-noframe.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ <h1 class="bar">All Classes</h1>
4343
<li><a href="processing/core/PShapeOBJ.html" title="class in processing.core">PShapeOBJ</a></li>
4444
<li><a href="processing/opengl/PShapeOpenGL.html" title="class in processing.opengl">PShapeOpenGL</a></li>
4545
<li><a href="processing/core/PShapeSVG.html" title="class in processing.core">PShapeSVG</a></li>
46+
<li><a href="processing/core/PShapeSVG.Font.html" title="class in processing.core">PShapeSVG.Font</a></li>
47+
<li><a href="processing/core/PShapeSVG.FontGlyph.html" title="class in processing.core">PShapeSVG.FontGlyph</a></li>
4648
<li><a href="processing/core/PStyle.html" title="class in processing.core">PStyle</a></li>
4749
<li><a href="processing/core/PVector.html" title="class in processing.core">PVector</a></li>
4850
<li><a href="processing/data/Sort.html" title="class in processing.data">Sort</a></li>

0 commit comments

Comments
 (0)