Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions app/src/processing/app/Mode.java
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,8 @@ public DefaultMutableTreeNode buildExamplesTree() {
}
}

DefaultMutableTreeNode foundationLibraries = new DefaultMutableTreeNode("Core Libraries");
DefaultMutableTreeNode foundationLibraries =
new DefaultMutableTreeNode(Language.text("examples.core_libraries"));

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

// Get examples for third party libraries
DefaultMutableTreeNode contributed = new DefaultMutableTreeNode("Libraries");
DefaultMutableTreeNode contributed = new
DefaultMutableTreeNode(Language.text("examples.libraries"));
for (Library lib : contribLibraries) {
if (lib.hasExamples()) {
DefaultMutableTreeNode libNode = new DefaultMutableTreeNode(lib.getName());
Expand Down
2 changes: 1 addition & 1 deletion app/src/processing/app/ProgressFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public void done() {
// to close the progress bar automatically when done, and to
// print that adding file is done in Message Area

editor.statusNotice("One file added to the sketch.");
editor.statusNotice(Language.text("editor.status.drag_and_drop.files_added.1"));
ProgressFrame.this.closeProgressBar();
}

Expand Down
54 changes: 53 additions & 1 deletion app/src/processing/app/contrib/Contribution.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import java.util.List;

import processing.core.PApplet;

import processing.app.Language;

abstract public class Contribution {
static final String SPECIAL_CATEGORY_NAME = "Starred";
Expand Down Expand Up @@ -251,6 +251,7 @@ static List<String> parseCategories(String categoryStr) {
String[] listing = PApplet.trim(PApplet.split(categoryStr, ','));
for (String category : listing) {
if (validCategories.contains(category)) {
category = translateCategory(category);
outgoing.add(category);
}
}
Expand All @@ -276,4 +277,55 @@ static List<String> parseImports(String importStr) {
}
return (outgoing.size() > 0) ? outgoing : null;
}

static private String translateCategory(String cat) {
String translated = "";

switch (cat) {
case "3D":
translated = Language.text("contrib.category.3d");
break;
case "Animation":
translated = Language.text("contrib.category.animation");
break;
case "Data":
translated = Language.text("contrib.category.data");
break;
case "Geometry":
translated = Language.text("contrib.category.geometry");
break;
case "GUI":
translated = Language.text("contrib.category.gui");
break;
case "Hardware":
translated = Language.text("contrib.category.hardware");
break;
case "I/O":
translated = Language.text("contrib.category.io");
break;
case "Math":
translated = Language.text("contrib.category.math");
break;
case "Simulation":
translated = Language.text("contrib.category.simulation");
break;
case "Sound":
translated = Language.text("contrib.category.sound");
break;
case "Typography":
translated = Language.text("contrib.category.typography");
break;
case "Utilities":
translated = Language.text("contrib.category.utilities");
break;
case "Video & Vision":
translated = Language.text("contrib.category.video_vision");
break;
case "Other":
translated = Language.text("contrib.category.other");
break;
}
return translated;
}

}
2 changes: 1 addition & 1 deletion app/src/processing/app/tools/Archiver.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public void fileSelected(File newbie) {
e.printStackTrace();
}
} else {
editor.statusNotice("Archive sketch canceled.");
editor.statusNotice(Language.text("editor.status.archiver.cancel"));
}
}

Expand Down
3 changes: 2 additions & 1 deletion app/src/processing/app/tools/ColorSelector.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ public void run() {
synchronized(ColorSelector.class) {
if (selector == null) {
selector = new ColorChooser(editor, false, Color.WHITE,
"Copy", new ActionListener() {
Language.text("menu.edit.copy"),
new ActionListener() {

@Override
public void actionPerformed(ActionEvent e) {
Expand Down
30 changes: 13 additions & 17 deletions app/src/processing/app/tools/CreateFont.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,7 @@ public void init(Editor editor) {

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

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

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

JPanel panel = new JPanel();
panel.add(new JLabel("Size:"));
panel.add(new JLabel(Language.text("create_font.size") + ":" ));
sizeSelector = new JTextField(" 48 ");
sizeSelector.getDocument().addDocumentListener(new DocumentListener() {
public void insertUpdate(DocumentEvent e) { update(); }
Expand All @@ -215,7 +212,7 @@ public void changedUpdate(DocumentEvent e) { }
});
panel.add(sizeSelector);

smoothBox = new JCheckBox("Smooth");
smoothBox = new JCheckBox(Language.text("create_font.smooth"));
smoothBox.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
smooth = smoothBox.isSelected();
Expand All @@ -233,7 +230,7 @@ public void actionPerformed(ActionEvent e) {
// });
// allBox.setSelected(all);
// panel.add(allBox);
charsetButton = new JButton("Characters...");
charsetButton = new JButton(Language.text("create_font.characters"));
charsetButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
//showCharacterList();
Expand All @@ -245,7 +242,7 @@ public void actionPerformed(ActionEvent e) {
pain.add(panel);

JPanel filestuff = new JPanel();
filestuff.add(new JLabel("Filename:"));
filestuff.add(new JLabel(Language.text("create_font.filename") + ":"));
filestuff.add(filenameField = new JTextField(20));
filestuff.add(new JLabel(".vlw"));
pain.add(filestuff);
Expand Down Expand Up @@ -503,7 +500,7 @@ class CharacterSelector extends JFrame {


public CharacterSelector() {
super("Character Selector");
super(Language.text("create_font.character_selector"));

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

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

String labelText =
"Default characters will include most bitmaps for Mac OS\n" +
"and Windows Latin scripts. Including all characters may\n" +
"require large amounts of memory for all of the bitmaps.\n" +
"For greater control, you can select specific Unicode blocks.";
String labelText = Language.text("create_font.character_selector.label");
JTextArea textarea = new JTextArea(labelText);
textarea.setBorder(new EmptyBorder(13, 8, 13, 8));
textarea.setBackground(null);
Expand All @@ -546,9 +539,12 @@ public void actionPerformed(ActionEvent e) {
charsetList.setEnabled(unicodeCharsButton.isSelected());
}
};
defaultCharsButton = new JRadioButton("Default Characters");
allCharsButton = new JRadioButton("All Characters");
unicodeCharsButton = new JRadioButton("Specific Unicode Blocks");
defaultCharsButton =
new JRadioButton(Language.text("create_font.default_characters"));
allCharsButton =
new JRadioButton(Language.text("create_font.all_characters"));
unicodeCharsButton =
new JRadioButton(Language.text("create_font.specific_unicode"));

defaultCharsButton.addActionListener(listener);
allCharsButton.addActionListener(listener);
Expand Down
43 changes: 43 additions & 0 deletions build/shared/lib/languages/PDE.properties
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ menu.sketch.add_file = Add File...
# | File | Edit | Sketch | Debug | Tools | Help |
# | Debug |
menu.debug = Debug
menu.debug.enable = Enable Debugger
menu.debug.show_debug_toolbar = Show Debug Toolbar
menu.debug.debug = Debug
menu.debug.continue = Continue
Expand Down Expand Up @@ -200,6 +201,8 @@ sketchbook.tree = Sketchbook
# Examples (Frame)
examples = Examples
examples.add_examples = Add Examples...
examples.libraries = Libraries
examples.core_libraries = Core Libraries

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

# Create Font (Frame)
create_font = Create Font
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.
create_font.size = Size
create_font.smooth = Smooth
create_font.characters = Characters...
create_font.character_selector = Character Selector
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.
create_font.default_characters = Default Characters
create_font.all_characters = All Characters
create_font.specific_unicode = Specific Unicode Blocks
create_font.filename = Filename

# Color Selector (Frame)
color_selector = Color Selector
Expand All @@ -252,6 +265,16 @@ archive_sketch = Archive sketch as...
# Close (Frame)
close.unsaved_changes = Save changes to

# Tweak Mode
tweak_mode = Tweak Mode
tweak_mode.save_before_tweak = Please save the sketch before running in Tweak Mode.
tweak_mode.keep_changes.line1 = Keep the changes?
tweak_mode.keep_changes.line2 = You changed some values in your sketch. Would you like to keep the changes?

# DebugTray
debugger.name = Name
debugger.value = Value
debugger.type = Type

# ---------------------------------------
# Toolbars
Expand Down Expand Up @@ -313,8 +336,11 @@ editor.status.printing.done = Done printing.
editor.status.printing.error = Error while printing.
editor.status.printing.canceled = Printing canceled.
editor.status.copy_as_html = Code formatted as HTML has been copied to the clipboard.
editor.status.debug.busy = Debugger busy...

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

# Footer buttons
editor.footer.errors = Errors
Expand Down Expand Up @@ -409,6 +438,20 @@ contrib.progress.starting = Starting
contrib.progress.downloading = Downloading
contrib.download_error = An error occured while downloading the contribution.
contrib.unsupported_operating_system = Your operating system does not appear to be supported. You should visit the %s\'s library for more info.
contrib.category.3d = 3D
contrib.category.animation = Animation
contrib.category.data = Data
contrib.category.geometry = Geometry
contrib.category.gui = GUI
contrib.category.hardware = Hardware
contrib.category.io = I/O
contrib.category.math = Math
contrib.category.simulation = Simulation
contrib.category.sound = Sound
contrib.category.typography = Typography
contrib.category.utilities = Utilities
contrib.category.video_vision = Video & Vision
contrib.category.other = Other

# Install on Startup
contrib.startup.errors.download_install = Error during download and install of %s
Expand Down
Loading