Add language hooks for UpdateCheck and ColorChooser

This commit is contained in:
Federico Bond
2014-08-03 19:47:26 -03:00
parent b4a784ad72
commit 2ece4f952c
3 changed files with 19 additions and 11 deletions

View File

@@ -70,7 +70,7 @@ public class ColorChooser { //extends JFrame implements DocumentListener {
public ColorChooser(Frame owner, boolean modal, Color initialColor,
String buttonName, ActionListener buttonListener) {
//super("Color Selector");
window = new JDialog(owner, "Color Selector", modal);
window = new JDialog(owner, Language.text("color_chooser"), modal);
window.getContentPane().setLayout(new BorderLayout());
Box box = Box.createHorizontalBox();

View File

@@ -137,14 +137,12 @@ public class UpdateCheck {
protected boolean promptToVisitDownloadPage() {
String prompt =
"A new version of Processing is available,\n" +
"would you like to visit the Processing download page?";
String prompt = Language.text("update_check.updates_available.core");
Object[] options = { "Yes", "No" };
Object[] options = { Language.text("prompt.yes"), Language.text("prompt.no") };
int result = JOptionPane.showOptionDialog(base.activeEditor,
prompt,
"Update",
Language.text("update_check"),
JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE,
null,
@@ -160,14 +158,12 @@ public class UpdateCheck {
protected boolean promptToOpenContributionManager() {
String contributionPrompt =
"There are updates available for some of the installed contributions,\n" +
"would you like to open the the Contribution Manager now?";
String contributionPrompt = Language.text("update_check.updates_available.contributions");
Object[] options = { "Yes", "No" };
Object[] options = { Language.text("prompt.yes"), Language.text("prompt.no") };
int result = JOptionPane.showOptionDialog(base.activeEditor,
contributionPrompt,
"Update",
Language.text("update_check"),
JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE,
null,

View File

@@ -277,3 +277,15 @@ contributions.unsupported_operating_system = Your operating system doesn't appea
warn.delete = Delete
warn.delete.sketch = Are you sure you want to delete this sketch?
warn.delete.file = Are you sure you want to delete "%s"?
# ---------------------------------------
# Update Check
update_check = Update
update_check.updates_available.core = A new version of Processing is available,\nwould you like to visit the Processing download page?
update_check.updates_available.contributions = There are updates available for some of the installed contributions,\nwould you like to open the the Contribution Manager now?
# ---------------------------------------
# Color Chooser
color_chooser = Color Selector