Skip to content

Commit 2b742a3

Browse files
committed
improve internationalization and localization in greek
1 parent 2a01c3a commit 2b742a3

File tree

13 files changed

+224
-38
lines changed

13 files changed

+224
-38
lines changed

app/src/processing/app/Mode.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,8 @@ public DefaultMutableTreeNode buildExamplesTree() {
661661
}
662662
}
663663

664-
DefaultMutableTreeNode foundationLibraries = new DefaultMutableTreeNode("Core Libraries");
664+
DefaultMutableTreeNode foundationLibraries =
665+
new DefaultMutableTreeNode(Language.text("examples.core_libraries"));
665666

666667
// Get examples for core libraries
667668
for (Library lib : coreLibraries) {
@@ -676,7 +677,8 @@ public DefaultMutableTreeNode buildExamplesTree() {
676677
}
677678

678679
// Get examples for third party libraries
679-
DefaultMutableTreeNode contributed = new DefaultMutableTreeNode("Libraries");
680+
DefaultMutableTreeNode contributed = new
681+
DefaultMutableTreeNode(Language.text("examples.libraries"));
680682
for (Library lib : contribLibraries) {
681683
if (lib.hasExamples()) {
682684
DefaultMutableTreeNode libNode = new DefaultMutableTreeNode(lib.getName());

app/src/processing/app/ProgressFrame.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public void done() {
131131
// to close the progress bar automatically when done, and to
132132
// print that adding file is done in Message Area
133133

134-
editor.statusNotice("One file added to the sketch.");
134+
editor.statusNotice(Language.text("editor.status.drag_and_drop.files_added.1"));
135135
ProgressFrame.this.closeProgressBar();
136136
}
137137

app/src/processing/app/contrib/Contribution.java

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import java.util.List;
2727

2828
import processing.core.PApplet;
29-
29+
import processing.app.Language;
3030

3131
abstract public class Contribution {
3232
static final String SPECIAL_CATEGORY_NAME = "Starred";
@@ -251,6 +251,7 @@ static List<String> parseCategories(String categoryStr) {
251251
String[] listing = PApplet.trim(PApplet.split(categoryStr, ','));
252252
for (String category : listing) {
253253
if (validCategories.contains(category)) {
254+
category = translateCategory(category);
254255
outgoing.add(category);
255256
}
256257
}
@@ -276,4 +277,55 @@ static List<String> parseImports(String importStr) {
276277
}
277278
return (outgoing.size() > 0) ? outgoing : null;
278279
}
280+
281+
static private String translateCategory(String cat) {
282+
String translated = "";
283+
284+
switch (cat) {
285+
case "3D":
286+
translated = Language.text("contrib.category.3d");
287+
break;
288+
case "Animation":
289+
translated = Language.text("contrib.category.animation");
290+
break;
291+
case "Data":
292+
translated = Language.text("contrib.category.data");
293+
break;
294+
case "Geometry":
295+
translated = Language.text("contrib.category.geometry");
296+
break;
297+
case "GUI":
298+
translated = Language.text("contrib.category.gui");
299+
break;
300+
case "Hardware":
301+
translated = Language.text("contrib.category.hardware");
302+
break;
303+
case "I/O":
304+
translated = Language.text("contrib.category.io");
305+
break;
306+
case "Math":
307+
translated = Language.text("contrib.category.math");
308+
break;
309+
case "Simulation":
310+
translated = Language.text("contrib.category.simulation");
311+
break;
312+
case "Sound":
313+
translated = Language.text("contrib.category.sound");
314+
break;
315+
case "Typography":
316+
translated = Language.text("contrib.category.typography");
317+
break;
318+
case "Utilities":
319+
translated = Language.text("contrib.category.utilities");
320+
break;
321+
case "Video & Vision":
322+
translated = Language.text("contrib.category.video_vision");
323+
break;
324+
case "Other":
325+
translated = Language.text("contrib.category.other");
326+
break;
327+
}
328+
return translated;
329+
}
330+
279331
}

app/src/processing/app/tools/Archiver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public void fileSelected(File newbie) {
125125
e.printStackTrace();
126126
}
127127
} else {
128-
editor.statusNotice("Archive sketch canceled.");
128+
editor.statusNotice(Language.text("editor.status.archiver.cancel"));
129129
}
130130
}
131131

app/src/processing/app/tools/ColorSelector.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ public void run() {
6363
synchronized(ColorSelector.class) {
6464
if (selector == null) {
6565
selector = new ColorChooser(editor, false, Color.WHITE,
66-
"Copy", new ActionListener() {
66+
Language.text("menu.edit.copy"),
67+
new ActionListener() {
6768

6869
@Override
6970
public void actionPerformed(ActionEvent e) {

app/src/processing/app/tools/CreateFont.java

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,7 @@ public void init(Editor editor) {
9595

9696
pain.setLayout(new BoxLayout(pain, BoxLayout.Y_AXIS));
9797

98-
String labelText =
99-
"Use this tool to create bitmap fonts for your program.\n" +
100-
"Select a font and size, and click 'OK' to generate the font.\n" +
101-
"It will be added to the data folder of the current sketch.";
98+
String labelText = Language.text("create_font.label");
10299

103100
JTextArea textarea = new JTextArea(labelText);
104101
textarea.setBorder(new EmptyBorder(10, 10, 20, 10));
@@ -206,7 +203,7 @@ public void valueChanged(ListSelectionEvent e) {
206203
pain.add(new Box.Filler(d2, d2, d2));
207204

208205
JPanel panel = new JPanel();
209-
panel.add(new JLabel("Size:"));
206+
panel.add(new JLabel(Language.text("create_font.size") + ":" ));
210207
sizeSelector = new JTextField(" 48 ");
211208
sizeSelector.getDocument().addDocumentListener(new DocumentListener() {
212209
public void insertUpdate(DocumentEvent e) { update(); }
@@ -215,7 +212,7 @@ public void changedUpdate(DocumentEvent e) { }
215212
});
216213
panel.add(sizeSelector);
217214

218-
smoothBox = new JCheckBox("Smooth");
215+
smoothBox = new JCheckBox(Language.text("create_font.smooth"));
219216
smoothBox.addActionListener(new ActionListener() {
220217
public void actionPerformed(ActionEvent e) {
221218
smooth = smoothBox.isSelected();
@@ -233,7 +230,7 @@ public void actionPerformed(ActionEvent e) {
233230
// });
234231
// allBox.setSelected(all);
235232
// panel.add(allBox);
236-
charsetButton = new JButton("Characters...");
233+
charsetButton = new JButton(Language.text("create_font.characters"));
237234
charsetButton.addActionListener(new ActionListener() {
238235
public void actionPerformed(ActionEvent e) {
239236
//showCharacterList();
@@ -245,7 +242,7 @@ public void actionPerformed(ActionEvent e) {
245242
pain.add(panel);
246243

247244
JPanel filestuff = new JPanel();
248-
filestuff.add(new JLabel("Filename:"));
245+
filestuff.add(new JLabel(Language.text("create_font.filename") + ":"));
249246
filestuff.add(filenameField = new JTextField(20));
250247
filestuff.add(new JLabel(".vlw"));
251248
pain.add(filestuff);
@@ -503,7 +500,7 @@ class CharacterSelector extends JFrame {
503500

504501

505502
public CharacterSelector() {
506-
super("Character Selector");
503+
super(Language.text("create_font.character_selector"));
507504

508505
charsetList = new CheckBoxList();
509506
DefaultListModel<JCheckBox> model = new DefaultListModel<JCheckBox>();
@@ -526,11 +523,7 @@ public CharacterSelector() {
526523

527524
pain.setLayout(new BoxLayout(pain, BoxLayout.Y_AXIS));
528525

529-
String labelText =
530-
"Default characters will include most bitmaps for Mac OS\n" +
531-
"and Windows Latin scripts. Including all characters may\n" +
532-
"require large amounts of memory for all of the bitmaps.\n" +
533-
"For greater control, you can select specific Unicode blocks.";
526+
String labelText = Language.text("create_font.character_selector.label");
534527
JTextArea textarea = new JTextArea(labelText);
535528
textarea.setBorder(new EmptyBorder(13, 8, 13, 8));
536529
textarea.setBackground(null);
@@ -546,9 +539,12 @@ public void actionPerformed(ActionEvent e) {
546539
charsetList.setEnabled(unicodeCharsButton.isSelected());
547540
}
548541
};
549-
defaultCharsButton = new JRadioButton("Default Characters");
550-
allCharsButton = new JRadioButton("All Characters");
551-
unicodeCharsButton = new JRadioButton("Specific Unicode Blocks");
542+
defaultCharsButton =
543+
new JRadioButton(Language.text("create_font.default_characters"));
544+
allCharsButton =
545+
new JRadioButton(Language.text("create_font.all_characters"));
546+
unicodeCharsButton =
547+
new JRadioButton(Language.text("create_font.specific_unicode"));
552548

553549
defaultCharsButton.addActionListener(listener);
554550
allCharsButton.addActionListener(listener);

build/shared/lib/languages/PDE.properties

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ menu.sketch.add_file = Add File...
6666
# | File | Edit | Sketch | Debug | Tools | Help |
6767
# | Debug |
6868
menu.debug = Debug
69+
menu.debug.enable = Enable Debugger
6970
menu.debug.show_debug_toolbar = Show Debug Toolbar
7071
menu.debug.debug = Debug
7172
menu.debug.continue = Continue
@@ -200,6 +201,8 @@ sketchbook.tree = Sketchbook
200201
# Examples (Frame)
201202
examples = Examples
202203
examples.add_examples = Add Examples...
204+
examples.libraries = Libraries
205+
examples.core_libraries = Core Libraries
203206

204207
# Export (Frame)
205208
export = Export Options
@@ -242,6 +245,16 @@ file = Select an image or other data file to copy to your sketch
242245

243246
# Create Font (Frame)
244247
create_font = Create Font
248+
create_font.label = Use this tool to create bitmap fonts for your program.\nSelect a font and size, and click 'OK' to generate the font.\n It will be added to the data folder of the current sketch.
249+
create_font.size = Size
250+
create_font.smooth = Smooth
251+
create_font.characters = Characters...
252+
create_font.character_selector = Character Selector
253+
create_font.character_selector.label = Default characters will include most bitmaps for Mac OS\nand Windows Latin scripts. Including all characters may\nrequire large amounts of memory for all of the bitmaps.\nFor greater control, you can select specific Unicode blocks.
254+
create_font.default_characters = Default Characters
255+
create_font.all_characters = All Characters
256+
create_font.specific_unicode = Specific Unicode Blocks
257+
create_font.filename = Filename
245258

246259
# Color Selector (Frame)
247260
color_selector = Color Selector
@@ -252,6 +265,16 @@ archive_sketch = Archive sketch as...
252265
# Close (Frame)
253266
close.unsaved_changes = Save changes to
254267

268+
# Tweak Mode
269+
tweak_mode = Tweak Mode
270+
tweak_mode.save_before_tweak = Please save the sketch before running in Tweak Mode.
271+
tweak_mode.keep_changes.line1 = Keep the changes?
272+
tweak_mode.keep_changes.line2 = You changed some values in your sketch. Would you like to keep the changes?
273+
274+
# DebugTray
275+
debugger.name = Name
276+
debugger.value = Value
277+
debugger.type = Type
255278

256279
# ---------------------------------------
257280
# Toolbars
@@ -313,8 +336,11 @@ editor.status.printing.done = Done printing.
313336
editor.status.printing.error = Error while printing.
314337
editor.status.printing.canceled = Printing canceled.
315338
editor.status.copy_as_html = Code formatted as HTML has been copied to the clipboard.
339+
editor.status.debug.busy = Debugger busy...
316340

317341
# Errors
342+
editor.status.warning = Warning
343+
editor.status.error = Error
318344
editor.status.error_on = Error on
319345
editor.status.missing.semi_colon = Missing a semi-colon
320346
editor.status.missing.open_sq_bracket = Missing opening square bracket
@@ -334,6 +360,9 @@ editor.status.undef_class = The class classname doesn't exist
334360
editor.status.undef_var = The variable varname doesn't exist
335361
editor.status.undef_name = The name namefield can't be recognized
336362
editor.status.type_mismatch = Type mismatch, typeA doesn't match with typeB
363+
editor.status.unused_variable = The value of the local variable varname is not used
364+
editor.status.uninitialized_variable = The local variable varname may not have been initialized
365+
editor.status.no_effect_assignment = The assignment to variable varname has no effect
337366

338367
# Footer buttons
339368
editor.footer.errors = Errors
@@ -409,6 +438,20 @@ contrib.progress.starting = Starting
409438
contrib.progress.downloading = Downloading
410439
contrib.download_error = An error occured while downloading the contribution.
411440
contrib.unsupported_operating_system = Your operating system does not appear to be supported. You should visit the %s\'s library for more info.
441+
contrib.category.3d = 3D
442+
contrib.category.animation = Animation
443+
contrib.category.data = Data
444+
contrib.category.geometry = Geometry
445+
contrib.category.gui = GUI
446+
contrib.category.hardware = Hardware
447+
contrib.category.io = I/O
448+
contrib.category.math = Math
449+
contrib.category.simulation = Simulation
450+
contrib.category.sound = Sound
451+
contrib.category.typography = Typography
452+
contrib.category.utilities = Utilities
453+
contrib.category.video_vision = Video & Vision
454+
contrib.category.other = Other
412455

413456
# Install on Startup
414457
contrib.startup.errors.download_install = Error during download and install of %s

0 commit comments

Comments
 (0)