1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-16 11:21:18 +03:00

UI i18n and the Japanese text catalog.

Wrapped the every string literals with _(...) function.
The _() function resides in "app/src/processing/app/I18n.java",
which translates the UI texts using "Resources_XX.properties" file
where XX is the locale code.

I provided the properties file for the ja (Japanese) locale.
I created this file using "xgettext" and "msgcat" commands.
"i18n_update.{py,sh}" files are the tool I used to do that.

Change in "app/build.xml" is to include the properties files
in jar file.
This commit is contained in:
Shigeru KANEMOTO
2011-10-05 03:03:19 +09:00
committed by Shigeru KANEMOTO
parent fa4ab4f6ab
commit 541a7b3575
27 changed files with 3182 additions and 473 deletions

View File

@ -45,6 +45,9 @@
includeAntRuntime="false" includeAntRuntime="false"
debug="true" debug="true"
classpath="../core/core.jar; ${env.JAVA_HOME}/lib/tools.jar; lib/ant.jar; lib/ant-launcher.jar; lib/apple.jar; lib/ecj.jar; lib/jna.jar; lib/RXTXcomm.jar" /> classpath="../core/core.jar; ${env.JAVA_HOME}/lib/tools.jar; lib/ant.jar; lib/ant-launcher.jar; lib/apple.jar; lib/ecj.jar; lib/jna.jar; lib/RXTXcomm.jar" />
<copy todir="bin" overwrite="true" verbose="true">
<fileset dir="src" includes="**/*.properties" />
</copy>
</target> </target>
<target name="build" depends="compile" description="Build PDE"> <target name="build" depends="compile" description="Build PDE">

View File

@ -32,6 +32,7 @@ import javax.swing.*;
import processing.app.debug.Compiler; import processing.app.debug.Compiler;
import processing.app.debug.Target; import processing.app.debug.Target;
import processing.core.*; import processing.core.*;
import static processing.app.I18n._;
/** /**
@ -177,8 +178,8 @@ public class Base {
} catch (Exception e) { } catch (Exception e) {
String mess = e.getMessage(); String mess = e.getMessage();
if (mess.indexOf("ch.randelshofer.quaqua.QuaquaLookAndFeel") == -1) { if (mess.indexOf("ch.randelshofer.quaqua.QuaquaLookAndFeel") == -1) {
System.err.println("Non-fatal error while setting the Look & Feel."); System.err.println(_("Non-fatal error while setting the Look & Feel."));
System.err.println("The error message follows, however Arduino should run fine."); System.err.println(_("The error message follows, however Arduino should run fine."));
System.err.println(mess); System.err.println(mess);
} }
} }
@ -213,9 +214,9 @@ public class Base {
} }
platform = (Platform) platformClass.newInstance(); platform = (Platform) platformClass.newInstance();
} catch (Exception e) { } catch (Exception e) {
Base.showError("Problem Setting the Platform", Base.showError(_("Problem Setting the Platform"),
"An unknown error occurred while trying to load\n" + _("An unknown error occurred while trying to load\n" +
"platform-specific code for your machine.", e); "platform-specific code for your machine."), e);
} }
} }
@ -225,10 +226,10 @@ public class Base {
Class.forName("com.sun.jdi.VirtualMachine"); Class.forName("com.sun.jdi.VirtualMachine");
} catch (ClassNotFoundException cnfe) { } catch (ClassNotFoundException cnfe) {
Base.showPlatforms(); Base.showPlatforms();
Base.showError("Please install JDK 1.5 or later", Base.showError(_("Please install JDK 1.5 or later"),
"Arduino requires a full JDK (not just a JRE)\n" + _("Arduino requires a full JDK (not just a JRE)\n" +
"to run. Please install JDK 1.5 or later.\n" + "to run. Please install JDK 1.5 or later.\n" +
"More information can be found in the reference.", cnfe); "More information can be found in the reference."), cnfe);
} }
} }
@ -250,12 +251,12 @@ public class Base {
if (sketchbookPath != null) { if (sketchbookPath != null) {
File skechbookFolder = new File(sketchbookPath); File skechbookFolder = new File(sketchbookPath);
if (!skechbookFolder.exists()) { if (!skechbookFolder.exists()) {
Base.showWarning("Sketchbook folder disappeared", Base.showWarning(_("Sketchbook folder disappeared"),
"The sketchbook folder no longer exists.\n" + _("The sketchbook folder no longer exists.\n" +
"Arduino will switch to the default sketchbook\n" + "Arduino will switch to the default sketchbook\n" +
"location, and create a new sketchbook folder if\n" + "location, and create a new sketchbook folder if\n" +
"necessary. Arduino will then stop talking about\n" + "necessary. Arduino will then stop talking about\n" +
"himself in the third person.", null); "himself in the third person."), null);
sketchbookPath = null; sketchbookPath = null;
} }
} }
@ -525,13 +526,13 @@ public class Base {
if (index == 26) { if (index == 26) {
// In 0159, avoid running past z by sending people outdoors. // In 0159, avoid running past z by sending people outdoors.
if (!breakTime) { if (!breakTime) {
Base.showWarning("Time for a Break", Base.showWarning(_("Time for a Break"),
"You've reached the limit for auto naming of new sketches\n" + _("You've reached the limit for auto naming of new sketches\n" +
"for the day. How about going for a walk instead?", null); "for the day. How about going for a walk instead?"), null);
breakTime = true; breakTime = true;
} else { } else {
Base.showWarning("Sunshine", Base.showWarning(_("Sunshine"),
"No really, time for some fresh air for you.", null); _("No really, time for some fresh air for you."), null);
} }
return null; return null;
} }
@ -626,7 +627,7 @@ public class Base {
public void handleOpenPrompt() { public void handleOpenPrompt() {
// get the frontmost window frame for placing file dialog // get the frontmost window frame for placing file dialog
FileDialog fd = new FileDialog(activeEditor, FileDialog fd = new FileDialog(activeEditor,
"Open an Arduino sketch...", _("Open an Arduino sketch..."),
FileDialog.LOAD); FileDialog.LOAD);
// This was annoying people, so disabled it in 0125. // This was annoying people, so disabled it in 0125.
//fd.setDirectory(Preferences.get("sketchbook.path")); //fd.setDirectory(Preferences.get("sketchbook.path"));
@ -765,17 +766,17 @@ public class Base {
if (Base.isMacOS()) { if (Base.isMacOS()) {
Object[] options = { "OK", "Cancel" }; Object[] options = { "OK", "Cancel" };
String prompt = String prompt =
"<html> " + _("<html> " +
"<head> <style type=\"text/css\">"+ "<head> <style type=\"text/css\">"+
"b { font: 13pt \"Lucida Grande\" }"+ "b { font: 13pt \"Lucida Grande\" }"+
"p { font: 11pt \"Lucida Grande\"; margin-top: 8px }"+ "p { font: 11pt \"Lucida Grande\"; margin-top: 8px }"+
"</style> </head>" + "</style> </head>" +
"<b>Are you sure you want to Quit?</b>" + "<b>Are you sure you want to Quit?</b>" +
"<p>Closing the last open sketch will quit Arduino."; "<p>Closing the last open sketch will quit Arduino.");
int result = JOptionPane.showOptionDialog(editor, int result = JOptionPane.showOptionDialog(editor,
prompt, prompt,
"Quit", _("Quit"),
JOptionPane.YES_NO_OPTION, JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE, JOptionPane.QUESTION_MESSAGE,
null, null,
@ -896,7 +897,7 @@ public class Base {
//System.out.println("rebuilding toolbar menu"); //System.out.println("rebuilding toolbar menu");
// Add the single "Open" item // Add the single "Open" item
item = Editor.newJMenuItem("Open...", 'O'); item = Editor.newJMenuItem(_("Open..."), 'O');
item.addActionListener(new ActionListener() { item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
handleOpenPrompt(); handleOpenPrompt();
@ -963,7 +964,7 @@ public class Base {
File sketchbookLibraries = getSketchbookLibrariesFolder(); File sketchbookLibraries = getSketchbookLibrariesFolder();
boolean found = addLibraries(importMenu, sketchbookLibraries); boolean found = addLibraries(importMenu, sketchbookLibraries);
if (found) { if (found) {
JMenuItem contrib = new JMenuItem("Contributed"); JMenuItem contrib = new JMenuItem(_("Contributed"));
contrib.setEnabled(false); contrib.setEnabled(false);
importMenu.insert(contrib, separatorIndex); importMenu.insert(contrib, separatorIndex);
importMenu.insertSeparator(separatorIndex); importMenu.insertSeparator(separatorIndex);
@ -1087,10 +1088,10 @@ public class Base {
handleOpen(path); handleOpen(path);
} }
} else { } else {
showWarning("Sketch Does Not Exist", showWarning(_("Sketch Does Not Exist"),
"The selected sketch no longer exists.\n" + _("The selected sketch no longer exists.\n" +
"You may need to restart Arduino to update\n" + "You may need to restart Arduino to update\n" +
"the sketchbook menu.", null); "the sketchbook menu."), null);
} }
} }
}; };
@ -1116,14 +1117,15 @@ public class Base {
//if (!sanityCheck.equals(list[i])) { //if (!sanityCheck.equals(list[i])) {
if (!Sketch.isSanitaryName(list[i])) { if (!Sketch.isSanitaryName(list[i])) {
if (!builtOnce) { if (!builtOnce) {
String complaining = String complaining = I18n.format(
"The sketch \"" + list[i] + "\" cannot be used.\n" + _("The sketch \"{0}\" cannot be used.\n" +
"Sketch names must contain only basic letters and numbers\n" + "Sketch names must contain only basic letters and numbers\n" +
"(ASCII-only with no spaces, " + "(ASCII-only with no spaces, " +
"and it cannot start with a number).\n" + "and it cannot start with a number).\n" +
"To get rid of this message, remove the sketch from\n" + "To get rid of this message, remove the sketch from\n" +
entry.getAbsolutePath(); "{1}"), list[i], entry.getAbsolutePath()
Base.showMessage("Ignoring sketch with bad name", complaining); );
Base.showMessage(_("Ignoring sketch with bad name"), complaining);
} }
continue; continue;
} }
@ -1192,11 +1194,13 @@ public class Base {
// if (libraryJar.exists()) { // if (libraryJar.exists()) {
String sanityCheck = Sketch.sanitizeName(potentialName); String sanityCheck = Sketch.sanitizeName(potentialName);
if (!sanityCheck.equals(potentialName)) { if (!sanityCheck.equals(potentialName)) {
String mess = String mess = I18n.format(
"The library \"" + potentialName + "\" cannot be used.\n" + _("The library \"{0}\" cannot be used.\n" +
"Library names must contain only basic letters and numbers.\n" + "Library names must contain only basic letters and numbers.\n" +
"(ASCII only and no spaces, and it cannot start with a number)"; "(ASCII only and no spaces, and it cannot start with a number)"),
Base.showMessage("Ignoring bad library name", mess); potentialName
);
Base.showMessage(_("Ignoring bad library name"), mess);
continue; continue;
} }
@ -1421,17 +1425,17 @@ public class Base {
try { try {
settingsFolder = platform.getSettingsFolder(); settingsFolder = platform.getSettingsFolder();
} catch (Exception e) { } catch (Exception e) {
showError("Problem getting data folder", showError(_("Problem getting data folder"),
"Error getting the Arduino data folder.", e); _("Error getting the Arduino data folder."), e);
} }
} }
// create the folder if it doesn't exist already // create the folder if it doesn't exist already
if (!settingsFolder.exists()) { if (!settingsFolder.exists()) {
if (!settingsFolder.mkdirs()) { if (!settingsFolder.mkdirs()) {
showError("Settings issues", showError(_("Settings issues"),
"Arduino cannot run because it could not\n" + _("Arduino cannot run because it could not\n" +
"create a folder to store your settings.", null); "create a folder to store your settings."), null);
} }
} }
return settingsFolder; return settingsFolder;
@ -1591,9 +1595,9 @@ public class Base {
} }
if (!result) { if (!result) {
showError("You forgot your sketchbook", showError(_("You forgot your sketchbook"),
"Arduino cannot run because it could not\n" + _("Arduino cannot run because it could not\n" +
"create a folder to store your sketchbook.", null); "create a folder to store your sketchbook."), null);
} }
return sketchbookFolder; return sketchbookFolder;
@ -1612,7 +1616,7 @@ public class Base {
return folder; return folder;
} }
String prompt = "Select (or create new) folder for sketches..."; String prompt = _("Select (or create new) folder for sketches...");
folder = Base.selectFolder(prompt, null, null); folder = Base.selectFolder(prompt, null, null);
if (folder == null) { if (folder == null) {
System.exit(0); System.exit(0);
@ -1636,8 +1640,8 @@ public class Base {
platform.openURL(url); platform.openURL(url);
} catch (Exception e) { } catch (Exception e) {
showWarning("Problem Opening URL", showWarning(_("Problem Opening URL"),
"Could not open the URL\n" + url, e); I18n.format(_("Could not open the URL\n{0}"), url), e);
} }
} }
@ -1660,8 +1664,8 @@ public class Base {
platform.openFolder(file); platform.openFolder(file);
} catch (Exception e) { } catch (Exception e) {
showWarning("Problem Opening Folder", showWarning(_("Problem Opening Folder"),
"Could not open the folder\n" + file.getAbsolutePath(), e); I18n.format(_("Could not open the folder\n{0}"), file.getAbsolutePath()), e);
} }
} }
@ -1774,36 +1778,36 @@ public class Base {
static public void showGettingStarted() { static public void showGettingStarted() {
if (Base.isMacOS()) { if (Base.isMacOS()) {
Base.showReference("Guide_MacOSX.html"); Base.showReference(_("Guide_MacOSX.html"));
} else if (Base.isWindows()) { } else if (Base.isWindows()) {
Base.showReference("Guide_Windows.html"); Base.showReference(_("Guide_Windows.html"));
} else { } else {
Base.openURL("http://www.arduino.cc/playground/Learning/Linux"); Base.openURL(_("http://www.arduino.cc/playground/Learning/Linux"));
} }
} }
static public void showReference() { static public void showReference() {
showReference("index.html"); showReference(_("index.html"));
} }
static public void showEnvironment() { static public void showEnvironment() {
showReference("Guide_Environment.html"); showReference(_("Guide_Environment.html"));
} }
static public void showPlatforms() { static public void showPlatforms() {
showReference("environment" + File.separator + "platforms.html"); showReference(_("environment") + File.separator + _("platforms.html"));
} }
static public void showTroubleshooting() { static public void showTroubleshooting() {
showReference("Guide_Troubleshooting.html"); showReference(_("Guide_Troubleshooting.html"));
} }
static public void showFAQ() { static public void showFAQ() {
showReference("FAQ.html"); showReference(_("FAQ.html"));
} }
@ -1815,7 +1819,7 @@ public class Base {
* much of a bummer, but something to notify the user about. * much of a bummer, but something to notify the user about.
*/ */
static public void showMessage(String title, String message) { static public void showMessage(String title, String message) {
if (title == null) title = "Message"; if (title == null) title = _("Message");
if (commandLine) { if (commandLine) {
System.out.println(title + ": " + message); System.out.println(title + ": " + message);
@ -1831,7 +1835,7 @@ public class Base {
* Non-fatal error message with optional stack trace side dish. * Non-fatal error message with optional stack trace side dish.
*/ */
static public void showWarning(String title, String message, Exception e) { static public void showWarning(String title, String message, Exception e) {
if (title == null) title = "Warning"; if (title == null) title = _("Warning");
if (commandLine) { if (commandLine) {
System.out.println(title + ": " + message); System.out.println(title + ": " + message);
@ -1850,7 +1854,7 @@ public class Base {
* for errors that allow P5 to continue running. * for errors that allow P5 to continue running.
*/ */
static public void showError(String title, String message, Throwable e) { static public void showError(String title, String message, Throwable e) {
if (title == null) title = "Error"; if (title == null) title = _("Error");
if (commandLine) { if (commandLine) {
System.err.println(title + ": " + message); System.err.println(title + ": " + message);
@ -2183,14 +2187,22 @@ public class Base {
if (file.exists()) { if (file.exists()) {
boolean result = file.delete(); boolean result = file.delete();
if (!result) { if (!result) {
throw new IOException("Could not remove old version of " + throw new IOException(
file.getAbsolutePath()); I18n.format(
_("Could not remove old version of {0}"),
file.getAbsolutePath()
)
);
} }
} }
boolean result = temp.renameTo(file); boolean result = temp.renameTo(file);
if (!result) { if (!result) {
throw new IOException("Could not replace " + throw new IOException(
file.getAbsolutePath()); I18n.format(
_("Could not replace {0}"),
file.getAbsolutePath()
)
);
} }
} }
@ -2228,7 +2240,7 @@ public class Base {
if (dir.exists()) { if (dir.exists()) {
removeDescendants(dir); removeDescendants(dir);
if (!dir.delete()) { if (!dir.delete()) {
System.err.println("Could not delete " + dir); System.err.println(I18n.format(_("Could not delete {0}"), dir));
} }
} }
} }
@ -2251,7 +2263,7 @@ public class Base {
if (!Preferences.getBoolean("compiler.save_build_files")) { if (!Preferences.getBoolean("compiler.save_build_files")) {
if (!dead.delete()) { if (!dead.delete()) {
// temporarily disabled // temporarily disabled
System.err.println("Could not delete " + dead); System.err.println(I18n.format(_("Could not delete {0}"), dead));
} }
} }
} else { } else {

View File

@ -26,6 +26,7 @@ import processing.app.debug.*;
import processing.app.syntax.*; import processing.app.syntax.*;
import processing.app.tools.*; import processing.app.tools.*;
import processing.core.*; import processing.core.*;
import static processing.app.I18n._;
import java.awt.*; import java.awt.*;
import java.awt.datatransfer.*; import java.awt.datatransfer.*;
@ -370,13 +371,14 @@ public class Editor extends JFrame implements RunnerListener {
} }
if (successful == 0) { if (successful == 0) {
statusError("No files were added to the sketch."); statusError(_("No files were added to the sketch."));
} else if (successful == 1) { } else if (successful == 1) {
statusNotice("One file added to the sketch."); statusNotice(_("One file added to the sketch."));
} else { } else {
statusNotice(successful + " files added to the sketch."); statusNotice(
I18n.format(_("{0} files added to the sketch."), successful));
} }
return true; return true;
} }
@ -487,9 +489,9 @@ public class Editor extends JFrame implements RunnerListener {
protected JMenu buildFileMenu() { protected JMenu buildFileMenu() {
JMenuItem item; JMenuItem item;
fileMenu = new JMenu("File"); fileMenu = new JMenu(_("File"));
item = newJMenuItem("New", 'N'); item = newJMenuItem(_("New"), 'N');
item.addActionListener(new ActionListener() { item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
base.handleNew(); base.handleNew();
@ -497,7 +499,7 @@ public class Editor extends JFrame implements RunnerListener {
}); });
fileMenu.add(item); fileMenu.add(item);
item = Editor.newJMenuItem("Open...", 'O'); item = Editor.newJMenuItem(_("Open..."), 'O');
item.addActionListener(new ActionListener() { item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
base.handleOpenPrompt(); base.handleOpenPrompt();
@ -506,18 +508,18 @@ public class Editor extends JFrame implements RunnerListener {
fileMenu.add(item); fileMenu.add(item);
if (sketchbookMenu == null) { if (sketchbookMenu == null) {
sketchbookMenu = new JMenu("Sketchbook"); sketchbookMenu = new JMenu(_("Sketchbook"));
base.rebuildSketchbookMenu(sketchbookMenu); base.rebuildSketchbookMenu(sketchbookMenu);
} }
fileMenu.add(sketchbookMenu); fileMenu.add(sketchbookMenu);
if (examplesMenu == null) { if (examplesMenu == null) {
examplesMenu = new JMenu("Examples"); examplesMenu = new JMenu(_("Examples"));
base.rebuildExamplesMenu(examplesMenu); base.rebuildExamplesMenu(examplesMenu);
} }
fileMenu.add(examplesMenu); fileMenu.add(examplesMenu);
item = Editor.newJMenuItem("Close", 'W'); item = Editor.newJMenuItem(_("Close"), 'W');
item.addActionListener(new ActionListener() { item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
base.handleClose(Editor.this); base.handleClose(Editor.this);
@ -525,7 +527,7 @@ public class Editor extends JFrame implements RunnerListener {
}); });
fileMenu.add(item); fileMenu.add(item);
saveMenuItem = newJMenuItem("Save", 'S'); saveMenuItem = newJMenuItem(_("Save"), 'S');
saveMenuItem.addActionListener(new ActionListener() { saveMenuItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
handleSave(false); handleSave(false);
@ -533,7 +535,7 @@ public class Editor extends JFrame implements RunnerListener {
}); });
fileMenu.add(saveMenuItem); fileMenu.add(saveMenuItem);
saveAsMenuItem = newJMenuItemShift("Save As...", 'S'); saveAsMenuItem = newJMenuItemShift(_("Save As..."), 'S');
saveAsMenuItem.addActionListener(new ActionListener() { saveAsMenuItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
handleSaveAs(); handleSaveAs();
@ -541,7 +543,7 @@ public class Editor extends JFrame implements RunnerListener {
}); });
fileMenu.add(saveAsMenuItem); fileMenu.add(saveAsMenuItem);
item = newJMenuItem("Upload", 'U'); item = newJMenuItem(_("Upload"), 'U');
item.addActionListener(new ActionListener() { item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
handleExport(false); handleExport(false);
@ -549,7 +551,7 @@ public class Editor extends JFrame implements RunnerListener {
}); });
fileMenu.add(item); fileMenu.add(item);
item = newJMenuItemShift("Upload Using Programmer", 'U'); item = newJMenuItemShift(_("Upload Using Programmer"), 'U');
item.addActionListener(new ActionListener() { item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
handleExport(true); handleExport(true);
@ -559,7 +561,7 @@ public class Editor extends JFrame implements RunnerListener {
fileMenu.addSeparator(); fileMenu.addSeparator();
item = newJMenuItemShift("Page Setup", 'P'); item = newJMenuItemShift(_("Page Setup"), 'P');
item.addActionListener(new ActionListener() { item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
handlePageSetup(); handlePageSetup();
@ -567,7 +569,7 @@ public class Editor extends JFrame implements RunnerListener {
}); });
fileMenu.add(item); fileMenu.add(item);
item = newJMenuItem("Print", 'P'); item = newJMenuItem(_("Print"), 'P');
item.addActionListener(new ActionListener() { item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
handlePrint(); handlePrint();
@ -579,7 +581,7 @@ public class Editor extends JFrame implements RunnerListener {
if (!Base.isMacOS()) { if (!Base.isMacOS()) {
fileMenu.addSeparator(); fileMenu.addSeparator();
item = newJMenuItem("Preferences", ','); item = newJMenuItem(_("Preferences"), ',');
item.addActionListener(new ActionListener() { item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
base.handlePrefs(); base.handlePrefs();
@ -589,7 +591,7 @@ public class Editor extends JFrame implements RunnerListener {
fileMenu.addSeparator(); fileMenu.addSeparator();
item = newJMenuItem("Quit", 'Q'); item = newJMenuItem(_("Quit"), 'Q');
item.addActionListener(new ActionListener() { item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
base.handleQuit(); base.handleQuit();
@ -603,9 +605,9 @@ public class Editor extends JFrame implements RunnerListener {
protected JMenu buildSketchMenu() { protected JMenu buildSketchMenu() {
JMenuItem item; JMenuItem item;
sketchMenu = new JMenu("Sketch"); sketchMenu = new JMenu(_("Sketch"));
item = newJMenuItem("Verify / Compile", 'R'); item = newJMenuItem(_("Verify / Compile"), 'R');
item.addActionListener(new ActionListener() { item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
handleRun(false); handleRun(false);
@ -632,12 +634,12 @@ public class Editor extends JFrame implements RunnerListener {
sketchMenu.addSeparator(); sketchMenu.addSeparator();
if (importMenu == null) { if (importMenu == null) {
importMenu = new JMenu("Import Library..."); importMenu = new JMenu(_("Import Library..."));
base.rebuildImportMenu(importMenu); base.rebuildImportMenu(importMenu);
} }
sketchMenu.add(importMenu); sketchMenu.add(importMenu);
item = newJMenuItem("Show Sketch Folder", 'K'); item = newJMenuItem(_("Show Sketch Folder"), 'K');
item.addActionListener(new ActionListener() { item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
Base.openFolder(sketch.getFolder()); Base.openFolder(sketch.getFolder());
@ -646,7 +648,7 @@ public class Editor extends JFrame implements RunnerListener {
sketchMenu.add(item); sketchMenu.add(item);
item.setEnabled(Base.openFolderAvailable()); item.setEnabled(Base.openFolderAvailable());
item = new JMenuItem("Add File..."); item = new JMenuItem(_("Add File..."));
item.addActionListener(new ActionListener() { item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
sketch.handleAddFile(); sketch.handleAddFile();
@ -659,13 +661,13 @@ public class Editor extends JFrame implements RunnerListener {
protected JMenu buildToolsMenu() { protected JMenu buildToolsMenu() {
toolsMenu = new JMenu("Tools"); toolsMenu = new JMenu(_("Tools"));
JMenu menu = toolsMenu; JMenu menu = toolsMenu;
JMenuItem item; JMenuItem item;
addInternalTools(menu); addInternalTools(menu);
item = newJMenuItemShift("Serial Monitor", 'M'); item = newJMenuItemShift(_("Serial Monitor"), 'M');
item.addActionListener(new ActionListener() { item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
handleSerial(); handleSerial();
@ -685,7 +687,7 @@ public class Editor extends JFrame implements RunnerListener {
// API, if possible (i.e. if it supports custom actions, etc.) // API, if possible (i.e. if it supports custom actions, etc.)
if (boardsMenu == null) { if (boardsMenu == null) {
boardsMenu = new JMenu("Board"); boardsMenu = new JMenu(_("Board"));
base.rebuildBoardsMenu(boardsMenu); base.rebuildBoardsMenu(boardsMenu);
} }
menu.add(boardsMenu); menu.add(boardsMenu);
@ -693,17 +695,16 @@ public class Editor extends JFrame implements RunnerListener {
if (serialMenuListener == null) if (serialMenuListener == null)
serialMenuListener = new SerialMenuListener(); serialMenuListener = new SerialMenuListener();
if (serialMenu == null) if (serialMenu == null)
serialMenu = new JMenu("Serial Port"); serialMenu = new JMenu(_("Serial Port"));
populateSerialMenu(); populateSerialMenu();
menu.add(serialMenu); menu.add(serialMenu);
menu.addSeparator(); menu.addSeparator();
JMenu programmerMenu = new JMenu("Programmer"); JMenu programmerMenu = new JMenu(_("Programmer"));
base.rebuildProgrammerMenu(programmerMenu); base.rebuildProgrammerMenu(programmerMenu);
menu.add(programmerMenu); menu.add(programmerMenu);
item = new JMenuItem("Burn Bootloader"); item = new JMenuItem(_("Burn Bootloader"));
item.addActionListener(new ActionListener() { item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
handleBurnBootloader(); handleBurnBootloader();
@ -927,18 +928,18 @@ public class Editor extends JFrame implements RunnerListener {
protected void selectSerialPort(String name) { protected void selectSerialPort(String name) {
if(serialMenu == null) { if(serialMenu == null) {
System.out.println("serialMenu is null"); System.out.println(_("serialMenu is null"));
return; return;
} }
if (name == null) { if (name == null) {
System.out.println("name is null"); System.out.println(_("name is null"));
return; return;
} }
JCheckBoxMenuItem selection = null; JCheckBoxMenuItem selection = null;
for (int i = 0; i < serialMenu.getItemCount(); i++) { for (int i = 0; i < serialMenu.getItemCount(); i++) {
JCheckBoxMenuItem item = ((JCheckBoxMenuItem)serialMenu.getItem(i)); JCheckBoxMenuItem item = ((JCheckBoxMenuItem)serialMenu.getItem(i));
if (item == null) { if (item == null) {
System.out.println("name is null"); System.out.println(_("name is null"));
continue; continue;
} }
item.setState(false); item.setState(false);
@ -990,7 +991,7 @@ public class Editor extends JFrame implements RunnerListener {
catch (Exception exception) catch (Exception exception)
{ {
System.out.println("error retrieving port list"); System.out.println(_("error retrieving port list"));
exception.printStackTrace(); exception.printStackTrace();
} }
@ -1001,12 +1002,12 @@ public class Editor extends JFrame implements RunnerListener {
//serialMenu.addSeparator(); //serialMenu.addSeparator();
//serialMenu.add(item); //serialMenu.add(item);
} }
protected JMenu buildHelpMenu() { protected JMenu buildHelpMenu() {
// To deal with a Mac OS X 10.5 bug, add an extra space after the name // To deal with a Mac OS X 10.5 bug, add an extra space after the name
// so that the OS doesn't try to insert its slow help menu. // so that the OS doesn't try to insert its slow help menu.
JMenu menu = new JMenu("Help "); JMenu menu = new JMenu(_("Help"));
JMenuItem item; JMenuItem item;
/* /*
@ -1045,7 +1046,7 @@ public class Editor extends JFrame implements RunnerListener {
menu.add(item); menu.add(item);
*/ */
item = new JMenuItem("Getting Started"); item = new JMenuItem(_("Getting Started"));
item.addActionListener(new ActionListener() { item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
Base.showGettingStarted(); Base.showGettingStarted();
@ -1053,7 +1054,7 @@ public class Editor extends JFrame implements RunnerListener {
}); });
menu.add(item); menu.add(item);
item = new JMenuItem("Environment"); item = new JMenuItem(_("Environment"));
item.addActionListener(new ActionListener() { item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
Base.showEnvironment(); Base.showEnvironment();
@ -1061,7 +1062,7 @@ public class Editor extends JFrame implements RunnerListener {
}); });
menu.add(item); menu.add(item);
item = new JMenuItem("Troubleshooting"); item = new JMenuItem(_("Troubleshooting"));
item.addActionListener(new ActionListener() { item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
Base.showTroubleshooting(); Base.showTroubleshooting();
@ -1069,7 +1070,7 @@ public class Editor extends JFrame implements RunnerListener {
}); });
menu.add(item); menu.add(item);
item = new JMenuItem("Reference"); item = new JMenuItem(_("Reference"));
item.addActionListener(new ActionListener() { item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
Base.showReference(); Base.showReference();
@ -1077,7 +1078,7 @@ public class Editor extends JFrame implements RunnerListener {
}); });
menu.add(item); menu.add(item);
item = newJMenuItemShift("Find in Reference", 'F'); item = newJMenuItemShift(_("Find in Reference"), 'F');
item.addActionListener(new ActionListener() { item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
if (textarea.isSelectionActive()) { if (textarea.isSelectionActive()) {
@ -1087,7 +1088,7 @@ public class Editor extends JFrame implements RunnerListener {
}); });
menu.add(item); menu.add(item);
item = new JMenuItem("Frequently Asked Questions"); item = new JMenuItem(_("Frequently Asked Questions"));
item.addActionListener(new ActionListener() { item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
Base.showFAQ(); Base.showFAQ();
@ -1095,10 +1096,10 @@ public class Editor extends JFrame implements RunnerListener {
}); });
menu.add(item); menu.add(item);
item = new JMenuItem("Visit Arduino.cc"); item = new JMenuItem(_("Visit Arduino.cc"));
item.addActionListener(new ActionListener() { item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
Base.openURL("http://arduino.cc/"); Base.openURL(_("http://arduino.cc/"));
} }
}); });
menu.add(item); menu.add(item);
@ -1106,7 +1107,7 @@ public class Editor extends JFrame implements RunnerListener {
// macosx already has its own about menu // macosx already has its own about menu
if (!Base.isMacOS()) { if (!Base.isMacOS()) {
menu.addSeparator(); menu.addSeparator();
item = new JMenuItem("About Arduino"); item = new JMenuItem(_("About Arduino"));
item.addActionListener(new ActionListener() { item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
base.handleAbout(); base.handleAbout();
@ -1120,14 +1121,14 @@ public class Editor extends JFrame implements RunnerListener {
protected JMenu buildEditMenu() { protected JMenu buildEditMenu() {
JMenu menu = new JMenu("Edit"); JMenu menu = new JMenu(_("Edit"));
JMenuItem item; JMenuItem item;
undoItem = newJMenuItem("Undo", 'Z'); undoItem = newJMenuItem(_("Undo"), 'Z');
undoItem.addActionListener(undoAction = new UndoAction()); undoItem.addActionListener(undoAction = new UndoAction());
menu.add(undoItem); menu.add(undoItem);
redoItem = newJMenuItem("Redo", 'Y'); redoItem = newJMenuItem(_("Redo"), 'Y');
redoItem.addActionListener(redoAction = new RedoAction()); redoItem.addActionListener(redoAction = new RedoAction());
menu.add(redoItem); menu.add(redoItem);
@ -1135,7 +1136,7 @@ public class Editor extends JFrame implements RunnerListener {
// TODO "cut" and "copy" should really only be enabled // TODO "cut" and "copy" should really only be enabled
// if some text is currently selected // if some text is currently selected
item = newJMenuItem("Cut", 'X'); item = newJMenuItem(_("Cut"), 'X');
item.addActionListener(new ActionListener() { item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
handleCut(); handleCut();
@ -1143,7 +1144,7 @@ public class Editor extends JFrame implements RunnerListener {
}); });
menu.add(item); menu.add(item);
item = newJMenuItem("Copy", 'C'); item = newJMenuItem(_("Copy"), 'C');
item.addActionListener(new ActionListener() { item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
textarea.copy(); textarea.copy();
@ -1151,7 +1152,7 @@ public class Editor extends JFrame implements RunnerListener {
}); });
menu.add(item); menu.add(item);
item = newJMenuItemShift("Copy for Forum", 'C'); item = newJMenuItemShift(_("Copy for Forum"), 'C');
item.addActionListener(new ActionListener() { item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
// SwingUtilities.invokeLater(new Runnable() { // SwingUtilities.invokeLater(new Runnable() {
@ -1163,7 +1164,7 @@ public class Editor extends JFrame implements RunnerListener {
}); });
menu.add(item); menu.add(item);
item = newJMenuItemAlt("Copy as HTML", 'C'); item = newJMenuItemAlt(_("Copy as HTML"), 'C');
item.addActionListener(new ActionListener() { item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
// SwingUtilities.invokeLater(new Runnable() { // SwingUtilities.invokeLater(new Runnable() {
@ -1175,7 +1176,7 @@ public class Editor extends JFrame implements RunnerListener {
}); });
menu.add(item); menu.add(item);
item = newJMenuItem("Paste", 'V'); item = newJMenuItem(_("Paste"), 'V');
item.addActionListener(new ActionListener() { item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
textarea.paste(); textarea.paste();
@ -1184,7 +1185,7 @@ public class Editor extends JFrame implements RunnerListener {
}); });
menu.add(item); menu.add(item);
item = newJMenuItem("Select All", 'A'); item = newJMenuItem(_("Select All"), 'A');
item.addActionListener(new ActionListener() { item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
textarea.selectAll(); textarea.selectAll();
@ -1194,7 +1195,7 @@ public class Editor extends JFrame implements RunnerListener {
menu.addSeparator(); menu.addSeparator();
item = newJMenuItem("Comment/Uncomment", '/'); item = newJMenuItem(_("Comment/Uncomment"), '/');
item.addActionListener(new ActionListener() { item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
handleCommentUncomment(); handleCommentUncomment();
@ -1202,7 +1203,7 @@ public class Editor extends JFrame implements RunnerListener {
}); });
menu.add(item); menu.add(item);
item = newJMenuItem("Increase Indent", ']'); item = newJMenuItem(_("Increase Indent"), ']');
item.addActionListener(new ActionListener() { item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
handleIndentOutdent(true); handleIndentOutdent(true);
@ -1210,7 +1211,7 @@ public class Editor extends JFrame implements RunnerListener {
}); });
menu.add(item); menu.add(item);
item = newJMenuItem("Decrease Indent", '['); item = newJMenuItem(_("Decrease Indent"), '[');
item.addActionListener(new ActionListener() { item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
handleIndentOutdent(false); handleIndentOutdent(false);
@ -1220,7 +1221,7 @@ public class Editor extends JFrame implements RunnerListener {
menu.addSeparator(); menu.addSeparator();
item = newJMenuItem("Find...", 'F'); item = newJMenuItem(_("Find..."), 'F');
item.addActionListener(new ActionListener() { item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
if (find == null) { if (find == null) {
@ -1235,7 +1236,7 @@ public class Editor extends JFrame implements RunnerListener {
// TODO find next should only be enabled after a // TODO find next should only be enabled after a
// search has actually taken place // search has actually taken place
item = newJMenuItem("Find Next", 'G'); item = newJMenuItem(_("Find Next"), 'G');
item.addActionListener(new ActionListener() { item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
if (find != null) { if (find != null) {
@ -1322,7 +1323,7 @@ public class Editor extends JFrame implements RunnerListener {
} else { } else {
this.setEnabled(false); this.setEnabled(false);
undoItem.setEnabled(false); undoItem.setEnabled(false);
undoItem.setText("Undo"); undoItem.setText(_("Undo"));
putValue(Action.NAME, "Undo"); putValue(Action.NAME, "Undo");
if (sketch != null) { if (sketch != null) {
sketch.setModified(false); // 0107 sketch.setModified(false); // 0107
@ -1357,7 +1358,7 @@ public class Editor extends JFrame implements RunnerListener {
} else { } else {
this.setEnabled(false); this.setEnabled(false);
redoItem.setEnabled(false); redoItem.setEnabled(false);
redoItem.setText("Redo"); redoItem.setText(_("Redo"));
putValue(Action.NAME, "Redo"); putValue(Action.NAME, "Redo");
} }
} }
@ -1797,15 +1798,17 @@ public class Editor extends JFrame implements RunnerListener {
String text = textarea.getSelectedText().trim(); String text = textarea.getSelectedText().trim();
if (text.length() == 0) { if (text.length() == 0) {
statusNotice("First select a word to find in the reference."); statusNotice(_("First select a word to find in the reference."));
} else { } else {
String referenceFile = PdeKeywords.getReference(text); String referenceFile = PdeKeywords.getReference(text);
//System.out.println("reference file is " + referenceFile); //System.out.println("reference file is " + referenceFile);
if (referenceFile == null) { if (referenceFile == null) {
statusNotice("No reference available for \"" + text + "\""); statusNotice(
I18n.format(_("No reference available for \"{0}\""), text)
);
} else { } else {
Base.showReference(referenceFile + ".html"); Base.showReference(I18n.format(_("{0}.html"), referenceFile));
} }
} }
} }
@ -1822,7 +1825,7 @@ public class Editor extends JFrame implements RunnerListener {
internalCloseRunner(); internalCloseRunner();
running = true; running = true;
toolbar.activate(EditorToolbar.RUN); toolbar.activate(EditorToolbar.RUN);
status.progress("Compiling sketch..."); status.progress(_("Compiling sketch..."));
// do this to advance/clear the terminal window / dos prompt / etc // do this to advance/clear the terminal window / dos prompt / etc
for (int i = 0; i < 10; i++) System.out.println(); for (int i = 0; i < 10; i++) System.out.println();
@ -1843,7 +1846,7 @@ public class Editor extends JFrame implements RunnerListener {
try { try {
sketch.prepare(); sketch.prepare();
sketch.build(false); sketch.build(false);
statusNotice("Done compiling."); statusNotice(_("Done compiling."));
} catch (Exception e) { } catch (Exception e) {
status.unprogress(); status.unprogress();
statusError(e); statusError(e);
@ -1860,7 +1863,7 @@ public class Editor extends JFrame implements RunnerListener {
try { try {
sketch.prepare(); sketch.prepare();
sketch.build(true); sketch.build(true);
statusNotice("Done compiling."); statusNotice(_("Done compiling."));
} catch (Exception e) { } catch (Exception e) {
status.unprogress(); status.unprogress();
statusError(e); statusError(e);
@ -1952,11 +1955,11 @@ public class Editor extends JFrame implements RunnerListener {
// As of Processing 1.0.10, this always happens immediately. // As of Processing 1.0.10, this always happens immediately.
// http://dev.processing.org/bugs/show_bug.cgi?id=1456 // http://dev.processing.org/bugs/show_bug.cgi?id=1456
String prompt = "Save changes to " + sketch.getName() + "? "; String prompt = I18n.format(_("Save changes to \"{0}\"? "), sketch.getName());
if (!Base.isMacOS()) { if (!Base.isMacOS()) {
int result = int result =
JOptionPane.showConfirmDialog(this, prompt, "Close", JOptionPane.showConfirmDialog(this, prompt, _("Close"),
JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.YES_NO_CANCEL_OPTION,
JOptionPane.QUESTION_MESSAGE); JOptionPane.QUESTION_MESSAGE);
@ -1985,18 +1988,18 @@ public class Editor extends JFrame implements RunnerListener {
// Pane formatting adapted from the quaqua guide // Pane formatting adapted from the quaqua guide
// http://www.randelshofer.ch/quaqua/guide/joptionpane.html // http://www.randelshofer.ch/quaqua/guide/joptionpane.html
JOptionPane pane = JOptionPane pane =
new JOptionPane("<html> " + new JOptionPane(_("<html> " +
"<head> <style type=\"text/css\">"+ "<head> <style type=\"text/css\">"+
"b { font: 13pt \"Lucida Grande\" }"+ "b { font: 13pt \"Lucida Grande\" }"+
"p { font: 11pt \"Lucida Grande\"; margin-top: 8px }"+ "p { font: 11pt \"Lucida Grande\"; margin-top: 8px }"+
"</style> </head>" + "</style> </head>" +
"<b>Do you want to save changes to this sketch<BR>" + "<b>Do you want to save changes to this sketch<BR>" +
" before closing?</b>" + " before closing?</b>" +
"<p>If you don't save, your changes will be lost.", "<p>If you don't save, your changes will be lost."),
JOptionPane.QUESTION_MESSAGE); JOptionPane.QUESTION_MESSAGE);
String[] options = new String[] { String[] options = new String[] {
"Save", "Cancel", "Don't Save" _("Save"), _("Cancel"), _("Don't Save")
}; };
pane.setOptions(options); pane.setOptions(options);
@ -2068,24 +2071,27 @@ public class Editor extends JFrame implements RunnerListener {
} else if (altInoFile.exists()) { } else if (altInoFile.exists()) {
path = altInoFile.getAbsolutePath(); path = altInoFile.getAbsolutePath();
} else if (!path.endsWith(".ino") && !path.endsWith(".pde")) { } else if (!path.endsWith(".ino") && !path.endsWith(".pde")) {
Base.showWarning("Bad file selected", Base.showWarning(_("Bad file selected"),
"Processing can only open its own sketches\n" + _("Processing can only open its own sketches\n" +
"and other files ending in .ino or .pde", null); "and other files ending in .ino or .pde"), null);
return false; return false;
} else { } else {
String properParent = String properParent =
fileName.substring(0, fileName.length() - 4); fileName.substring(0, fileName.length() - 4);
Object[] options = { "OK", "Cancel" }; Object[] options = { _("OK"), _("Cancel") };
String prompt = String prompt = I18n.format(
"The file \"" + fileName + "\" needs to be inside\n" + _("The file \"{0}\" needs to be inside\n" +
"a sketch folder named \"" + properParent + "\".\n" + "a sketch folder named \"{1}\".\n" +
"Create this folder, move the file, and continue?"; "Create this folder, move the file, and continue?"),
fileName,
properParent
);
int result = JOptionPane.showOptionDialog(this, int result = JOptionPane.showOptionDialog(this,
prompt, prompt,
"Moving", _("Moving"),
JOptionPane.YES_NO_OPTION, JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE, JOptionPane.QUESTION_MESSAGE,
null, null,
@ -2096,15 +2102,19 @@ public class Editor extends JFrame implements RunnerListener {
// create properly named folder // create properly named folder
File properFolder = new File(file.getParent(), properParent); File properFolder = new File(file.getParent(), properParent);
if (properFolder.exists()) { if (properFolder.exists()) {
Base.showWarning("Error", Base.showWarning(_("Error"),
"A folder named \"" + properParent + "\" " + I18n.format(
"already exists. Can't open sketch.", null); _("A folder named \"{0}\" already exists. " +
"Can't open sketch."),
properParent
),
null);
return false; return false;
} }
if (!properFolder.mkdirs()) { if (!properFolder.mkdirs()) {
//throw new IOException("Couldn't create sketch folder"); //throw new IOException("Couldn't create sketch folder");
Base.showWarning("Error", Base.showWarning(_("Error"),
"Could not create the sketch folder.", null); _("Could not create the sketch folder."), null);
return false; return false;
} }
// copy the sketch inside // copy the sketch inside
@ -2113,7 +2123,7 @@ public class Editor extends JFrame implements RunnerListener {
try { try {
Base.copyFile(origPdeFile, properPdeFile); Base.copyFile(origPdeFile, properPdeFile);
} catch (IOException e) { } catch (IOException e) {
Base.showWarning("Error", "Could not copy to a proper location.", e); Base.showWarning(_("Error"), _("Could not copy to a proper location."), e);
return false; return false;
} }
@ -2131,12 +2141,18 @@ public class Editor extends JFrame implements RunnerListener {
try { try {
sketch = new Sketch(this, path); sketch = new Sketch(this, path);
} catch (IOException e) { } catch (IOException e) {
Base.showWarning("Error", "Could not create the sketch.", e); Base.showWarning(_("Error"), _("Could not create the sketch."), e);
return false; return false;
} }
header.rebuild(); header.rebuild();
// Set the title of the window to "sketch_070752a - Processing 0126" // Set the title of the window to "sketch_070752a - Processing 0126"
setTitle(sketch.getName() + " | Arduino " + Base.VERSION_NAME); setTitle(
I18n.format(
_("{0} | Arduino {1}"),
sketch.getName(),
Base.VERSION_NAME
)
);
// Disable untitled setting from previous document, if any // Disable untitled setting from previous document, if any
untitled = false; untitled = false;
@ -2189,12 +2205,12 @@ public class Editor extends JFrame implements RunnerListener {
protected boolean handleSave2() { protected boolean handleSave2() {
toolbar.activate(EditorToolbar.SAVE); toolbar.activate(EditorToolbar.SAVE);
statusNotice("Saving..."); statusNotice(_("Saving..."));
boolean saved = false; boolean saved = false;
try { try {
saved = sketch.save(); saved = sketch.save();
if (saved) if (saved)
statusNotice("Done Saving."); statusNotice(_("Done Saving."));
else else
statusEmpty(); statusEmpty();
// rebuild sketch menu in case a save-as was forced // rebuild sketch menu in case a save-as was forced
@ -2227,16 +2243,16 @@ public class Editor extends JFrame implements RunnerListener {
//SwingUtilities.invokeLater(new Runnable() { //SwingUtilities.invokeLater(new Runnable() {
//public void run() { //public void run() {
statusNotice("Saving..."); statusNotice(_("Saving..."));
try { try {
if (sketch.saveAs()) { if (sketch.saveAs()) {
statusNotice("Done Saving."); statusNotice(_("Done Saving."));
// Disabling this for 0125, instead rebuild the menu inside // Disabling this for 0125, instead rebuild the menu inside
// the Save As method of the Sketch object, since that's the // the Save As method of the Sketch object, since that's the
// only one who knows whether something was renamed. // only one who knows whether something was renamed.
//sketchbook.rebuildMenusAsync(); //sketchbook.rebuildMenusAsync();
} else { } else {
statusNotice("Save Canceled."); statusNotice(_("Save Canceled."));
return false; return false;
} }
} catch (Exception e) { } catch (Exception e) {
@ -2261,11 +2277,12 @@ public class Editor extends JFrame implements RunnerListener {
String result = (String) String result = (String)
JOptionPane.showInputDialog(this, JOptionPane.showInputDialog(this,
"Serial port " + I18n.format(
Preferences.get("serial.port") + _("Serial port {0} not found.\n" +
" not found.\n" + "Retry the upload with another serial port?"),
"Retry the upload with another serial port?", Preferences.get("serial.port")
"Serial port not found", ),
"Serial port not found",
JOptionPane.PLAIN_MESSAGE, JOptionPane.PLAIN_MESSAGE,
null, null,
names, names,
@ -2296,7 +2313,7 @@ public class Editor extends JFrame implements RunnerListener {
//if (!handleExportCheckModified()) return; //if (!handleExportCheckModified()) return;
toolbar.activate(EditorToolbar.EXPORT); toolbar.activate(EditorToolbar.EXPORT);
console.clear(); console.clear();
status.progress("Uploading to I/O Board..."); status.progress(_("Uploading to I/O Board..."));
new Thread(usingProgrammer ? exportAppHandler : exportHandler).start(); new Thread(usingProgrammer ? exportAppHandler : exportHandler).start();
} }
@ -2313,7 +2330,7 @@ public class Editor extends JFrame implements RunnerListener {
boolean success = sketch.exportApplet(false); boolean success = sketch.exportApplet(false);
if (success) { if (success) {
statusNotice("Done uploading."); statusNotice(_("Done uploading."));
} else { } else {
// error message will already be visible // error message will already be visible
} }
@ -2321,7 +2338,7 @@ public class Editor extends JFrame implements RunnerListener {
populateSerialMenu(); populateSerialMenu();
if (serialMenu.getItemCount() == 0) statusError(e); if (serialMenu.getItemCount() == 0) statusError(e);
else if (serialPrompt()) run(); else if (serialPrompt()) run();
else statusNotice("Upload canceled."); else statusNotice(_("Upload canceled."));
} catch (RunnerException e) { } catch (RunnerException e) {
//statusError("Error during upload."); //statusError("Error during upload.");
//e.printStackTrace(); //e.printStackTrace();
@ -2349,7 +2366,7 @@ public class Editor extends JFrame implements RunnerListener {
boolean success = sketch.exportApplet(true); boolean success = sketch.exportApplet(true);
if (success) { if (success) {
statusNotice("Done uploading."); statusNotice(_("Done uploading."));
} else { } else {
// error message will already be visible // error message will already be visible
} }
@ -2357,7 +2374,7 @@ public class Editor extends JFrame implements RunnerListener {
populateSerialMenu(); populateSerialMenu();
if (serialMenu.getItemCount() == 0) statusError(e); if (serialMenu.getItemCount() == 0) statusError(e);
else if (serialPrompt()) run(); else if (serialPrompt()) run();
else statusNotice("Upload canceled."); else statusNotice(_("Upload canceled."));
} catch (RunnerException e) { } catch (RunnerException e) {
//statusError("Error during upload."); //statusError("Error during upload.");
//e.printStackTrace(); //e.printStackTrace();
@ -2383,10 +2400,10 @@ public class Editor extends JFrame implements RunnerListener {
protected boolean handleExportCheckModified() { protected boolean handleExportCheckModified() {
if (!sketch.isModified()) return true; if (!sketch.isModified()) return true;
Object[] options = { "OK", "Cancel" }; Object[] options = { _("OK"), _("Cancel") };
int result = JOptionPane.showOptionDialog(this, int result = JOptionPane.showOptionDialog(this,
"Save changes before export?", _("Save changes before export?"),
"Save", _("Save"),
JOptionPane.OK_CANCEL_OPTION, JOptionPane.OK_CANCEL_OPTION,
JOptionPane.QUESTION_MESSAGE, JOptionPane.QUESTION_MESSAGE,
null, null,
@ -2400,7 +2417,7 @@ public class Editor extends JFrame implements RunnerListener {
// why it's not CANCEL_OPTION is beyond me (at least on the mac) // why it's not CANCEL_OPTION is beyond me (at least on the mac)
// but f-- it.. let's get this shite done.. // but f-- it.. let's get this shite done..
//} else if (result == JOptionPane.CANCEL_OPTION) { //} else if (result == JOptionPane.CANCEL_OPTION) {
statusNotice("Export canceled, changes must first be saved."); statusNotice(_("Export canceled, changes must first be saved."));
//toolbar.clear(); //toolbar.clear();
return false; return false;
} }
@ -2422,23 +2439,23 @@ public class Editor extends JFrame implements RunnerListener {
protected void handleBurnBootloader() { protected void handleBurnBootloader() {
console.clear(); console.clear();
statusNotice("Burning bootloader to I/O Board (this may take a minute)..."); statusNotice(_("Burning bootloader to I/O Board (this may take a minute)..."));
SwingUtilities.invokeLater(new Runnable() { SwingUtilities.invokeLater(new Runnable() {
public void run() { public void run() {
try { try {
Uploader uploader = new AvrdudeUploader(); Uploader uploader = new AvrdudeUploader();
if (uploader.burnBootloader()) { if (uploader.burnBootloader()) {
statusNotice("Done burning bootloader."); statusNotice(_("Done burning bootloader."));
} else { } else {
statusError("Error while burning bootloader."); statusError(_("Error while burning bootloader."));
// error message will already be visible // error message will already be visible
} }
} catch (RunnerException e) { } catch (RunnerException e) {
statusError("Error while burning bootloader."); statusError(_("Error while burning bootloader."));
e.printStackTrace(); e.printStackTrace();
//statusError(e); //statusError(e);
} catch (Exception e) { } catch (Exception e) {
statusError("Error while burning bootloader."); statusError(_("Error while burning bootloader."));
e.printStackTrace(); e.printStackTrace();
} }
}}); }});
@ -2465,7 +2482,7 @@ public class Editor extends JFrame implements RunnerListener {
* Handler for File &rarr; Print. * Handler for File &rarr; Print.
*/ */
public void handlePrint() { public void handlePrint() {
statusNotice("Printing..."); statusNotice(_("Printing..."));
//printerJob = null; //printerJob = null;
if (printerJob == null) { if (printerJob == null) {
printerJob = PrinterJob.getPrinterJob(); printerJob = PrinterJob.getPrinterJob();
@ -2482,14 +2499,14 @@ public class Editor extends JFrame implements RunnerListener {
if (printerJob.printDialog()) { if (printerJob.printDialog()) {
try { try {
printerJob.print(); printerJob.print();
statusNotice("Done printing."); statusNotice(_("Done printing."));
} catch (PrinterException pe) { } catch (PrinterException pe) {
statusError("Error while printing."); statusError(_("Error while printing."));
pe.printStackTrace(); pe.printStackTrace();
} }
} else { } else {
statusNotice("Printing canceled."); statusNotice(_("Printing canceled."));
} }
//printerJob = null; // clear this out? //printerJob = null; // clear this out?
} }
@ -2537,7 +2554,7 @@ public class Editor extends JFrame implements RunnerListener {
} }
} }
if (line < 0 || line >= textarea.getLineCount()) { if (line < 0 || line >= textarea.getLineCount()) {
System.err.println("Bad error line: " + line); System.err.println(I18n.format(_("Bad error line: {0}"), line));
} else { } else {
textarea.select(textarea.getLineStartOffset(line), textarea.select(textarea.getLineStartOffset(line),
textarea.getLineStopOffset(line) - 1); textarea.getLineStopOffset(line) - 1);
@ -2606,7 +2623,7 @@ public class Editor extends JFrame implements RunnerListener {
private String clickedURL; private String clickedURL;
public TextAreaPopup() { public TextAreaPopup() {
openURLItem = new JMenuItem("Open URL"); openURLItem = new JMenuItem(_("Open URL"));
openURLItem.addActionListener(new ActionListener() { openURLItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
Base.openURL(clickedURL); Base.openURL(clickedURL);
@ -2617,7 +2634,7 @@ public class Editor extends JFrame implements RunnerListener {
openURLItemSeparator = new JSeparator(); openURLItemSeparator = new JSeparator();
add(openURLItemSeparator); add(openURLItemSeparator);
cutItem = new JMenuItem("Cut"); cutItem = new JMenuItem(_("Cut"));
cutItem.addActionListener(new ActionListener() { cutItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
handleCut(); handleCut();
@ -2625,7 +2642,7 @@ public class Editor extends JFrame implements RunnerListener {
}); });
add(cutItem); add(cutItem);
copyItem = new JMenuItem("Copy"); copyItem = new JMenuItem(_("Copy"));
copyItem.addActionListener(new ActionListener() { copyItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
handleCopy(); handleCopy();
@ -2633,7 +2650,7 @@ public class Editor extends JFrame implements RunnerListener {
}); });
add(copyItem); add(copyItem);
discourseItem = new JMenuItem("Copy for Forum"); discourseItem = new JMenuItem(_("Copy for Forum"));
discourseItem.addActionListener(new ActionListener() { discourseItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
handleDiscourseCopy(); handleDiscourseCopy();
@ -2641,7 +2658,7 @@ public class Editor extends JFrame implements RunnerListener {
}); });
add(discourseItem); add(discourseItem);
discourseItem = new JMenuItem("Copy as HTML"); discourseItem = new JMenuItem(_("Copy as HTML"));
discourseItem.addActionListener(new ActionListener() { discourseItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
handleHTMLCopy(); handleHTMLCopy();
@ -2649,7 +2666,7 @@ public class Editor extends JFrame implements RunnerListener {
}); });
add(discourseItem); add(discourseItem);
JMenuItem item = new JMenuItem("Paste"); JMenuItem item = new JMenuItem(_("Paste"));
item.addActionListener(new ActionListener() { item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
handlePaste(); handlePaste();
@ -2657,7 +2674,7 @@ public class Editor extends JFrame implements RunnerListener {
}); });
add(item); add(item);
item = new JMenuItem("Select All"); item = new JMenuItem(_("Select All"));
item.addActionListener(new ActionListener() { item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
handleSelectAll(); handleSelectAll();
@ -2667,7 +2684,7 @@ public class Editor extends JFrame implements RunnerListener {
addSeparator(); addSeparator();
item = new JMenuItem("Comment/Uncomment"); item = new JMenuItem(_("Comment/Uncomment"));
item.addActionListener(new ActionListener() { item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
handleCommentUncomment(); handleCommentUncomment();
@ -2675,7 +2692,7 @@ public class Editor extends JFrame implements RunnerListener {
}); });
add(item); add(item);
item = new JMenuItem("Increase Indent"); item = new JMenuItem(_("Increase Indent"));
item.addActionListener(new ActionListener() { item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
handleIndentOutdent(true); handleIndentOutdent(true);
@ -2683,7 +2700,7 @@ public class Editor extends JFrame implements RunnerListener {
}); });
add(item); add(item);
item = new JMenuItem("Decrease Indent"); item = new JMenuItem(_("Decrease Indent"));
item.addActionListener(new ActionListener() { item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
handleIndentOutdent(false); handleIndentOutdent(false);
@ -2693,7 +2710,7 @@ public class Editor extends JFrame implements RunnerListener {
addSeparator(); addSeparator();
referenceItem = new JMenuItem("Find in Reference"); referenceItem = new JMenuItem(_("Find in Reference"));
referenceItem.addActionListener(new ActionListener() { referenceItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
handleFindReference(); handleFindReference();

View File

@ -22,6 +22,7 @@
*/ */
package processing.app; package processing.app;
import static processing.app.I18n._;
import java.awt.*; import java.awt.*;
import java.awt.event.*; import java.awt.event.*;
@ -145,9 +146,8 @@ public class EditorConsole extends JScrollPane {
stderrFile = new FileOutputStream(errFile); stderrFile = new FileOutputStream(errFile);
} }
} catch (IOException e) { } catch (IOException e) {
Base.showWarning("Console Error", Base.showWarning(_("Console Error"),
"A problem occurred while trying to open the\n" + _("A problem occurred while trying to open the\nfiles used to store the console output."), e);
"files used to store the console output.", e);
} }
consoleOut = new PrintStream(new EditorConsoleStream(false)); consoleOut = new PrintStream(new EditorConsoleStream(false));
consoleErr = new PrintStream(new EditorConsoleStream(true)); consoleErr = new PrintStream(new EditorConsoleStream(true));

View File

@ -22,6 +22,7 @@
*/ */
package processing.app; package processing.app;
import static processing.app.I18n._;
import java.awt.*; import java.awt.*;
import java.awt.event.*; import java.awt.event.*;
@ -288,7 +289,7 @@ public class EditorHeader extends JComponent {
*/ */
//item = new JMenuItem("New Tab"); //item = new JMenuItem("New Tab");
item = Editor.newJMenuItemShift("New Tab", 'N'); item = Editor.newJMenuItemShift(_("New Tab"), 'N');
item.addActionListener(new ActionListener() { item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
editor.getSketch().handleNewCode(); editor.getSketch().handleNewCode();
@ -296,7 +297,7 @@ public class EditorHeader extends JComponent {
}); });
menu.add(item); menu.add(item);
item = new JMenuItem("Rename"); item = new JMenuItem(_("Rename"));
item.addActionListener(new ActionListener() { item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
editor.getSketch().handleRenameCode(); editor.getSketch().handleRenameCode();
@ -310,7 +311,7 @@ public class EditorHeader extends JComponent {
}); });
menu.add(item); menu.add(item);
item = new JMenuItem("Delete"); item = new JMenuItem(_("Delete"));
item.addActionListener(new ActionListener() { item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
editor.getSketch().handleDeleteCode(); editor.getSketch().handleDeleteCode();
@ -322,7 +323,7 @@ public class EditorHeader extends JComponent {
// KeyEvent.VK_LEFT and VK_RIGHT will make Windows beep // KeyEvent.VK_LEFT and VK_RIGHT will make Windows beep
item = new JMenuItem("Previous Tab"); item = new JMenuItem(_("Previous Tab"));
KeyStroke ctrlAltLeft = KeyStroke ctrlAltLeft =
KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, Editor.SHORTCUT_ALT_KEY_MASK); KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, Editor.SHORTCUT_ALT_KEY_MASK);
item.setAccelerator(ctrlAltLeft); item.setAccelerator(ctrlAltLeft);
@ -336,7 +337,7 @@ public class EditorHeader extends JComponent {
*/ */
menu.add(item); menu.add(item);
item = new JMenuItem("Next Tab"); item = new JMenuItem(_("Next Tab"));
KeyStroke ctrlAltRight = KeyStroke ctrlAltRight =
KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, Editor.SHORTCUT_ALT_KEY_MASK); KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, Editor.SHORTCUT_ALT_KEY_MASK);
item.setAccelerator(ctrlAltRight); item.setAccelerator(ctrlAltRight);

View File

@ -22,6 +22,7 @@
*/ */
package processing.app; package processing.app;
import static processing.app.I18n._;
import java.awt.*; import java.awt.*;
import java.awt.event.*; import java.awt.event.*;
@ -37,12 +38,12 @@ public class EditorToolbar extends JComponent implements MouseInputListener, Key
/** Rollover titles for each button. */ /** Rollover titles for each button. */
static final String title[] = { static final String title[] = {
"Verify", "Upload", "New", "Open", "Save", "Serial Monitor" _("Verify"), _("Upload"), _("New"), _("Open"), _("Save"), _("Serial Monitor")
}; };
/** Titles for each button when the shift key is pressed. */ /** Titles for each button when the shift key is pressed. */
static final String titleShift[] = { static final String titleShift[] = {
"Verify", "Upload Using Programmer", "New Editor Window", "Open in Another Window", "Save", "Serial Monitor" _("Verify"), _("Upload Using Programmer"), _("New Editor Window"), _("Open in Another Window"), _("Save"), _("Serial Monitor")
}; };
static final int BUTTON_COUNT = title.length; static final int BUTTON_COUNT = title.length;

View File

@ -22,6 +22,7 @@
*/ */
package processing.app; package processing.app;
import static processing.app.I18n._;
import java.awt.*; import java.awt.*;
import java.awt.event.*; import java.awt.event.*;
@ -75,9 +76,9 @@ public class FindReplace extends JFrame implements ActionListener {
Container pain = getContentPane(); Container pain = getContentPane();
pain.setLayout(null); pain.setLayout(null);
JLabel findLabel = new JLabel("Find:"); JLabel findLabel = new JLabel(_("Find:"));
Dimension d0 = findLabel.getPreferredSize(); Dimension d0 = findLabel.getPreferredSize();
JLabel replaceLabel = new JLabel("Replace with:"); JLabel replaceLabel = new JLabel(_("Replace with:"));
Dimension d1 = replaceLabel.getPreferredSize(); Dimension d1 = replaceLabel.getPreferredSize();
pain.add(findLabel); pain.add(findLabel);
@ -117,7 +118,7 @@ public class FindReplace extends JFrame implements ActionListener {
d1.width, d1.height); d1.width, d1.height);
//ignoreCase = true; //ignoreCase = true;
ignoreCaseBox = new JCheckBox("Ignore Case"); ignoreCaseBox = new JCheckBox(_("Ignore Case"));
ignoreCaseBox.addActionListener(new ActionListener() { ignoreCaseBox.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
ignoreCase = ignoreCaseBox.isSelected(); ignoreCase = ignoreCaseBox.isSelected();
@ -133,16 +134,16 @@ public class FindReplace extends JFrame implements ActionListener {
// ordering is different on mac versus pc // ordering is different on mac versus pc
if (Base.isMacOS()) { if (Base.isMacOS()) {
buttons.add(replaceAllButton = new JButton("Replace All")); buttons.add(replaceAllButton = new JButton(_("Replace All")));
buttons.add(replaceButton = new JButton("Replace")); buttons.add(replaceButton = new JButton(_("Replace")));
buttons.add(replaceFindButton = new JButton("Replace & Find")); buttons.add(replaceFindButton = new JButton(_("Replace & Find")));
buttons.add(findButton = new JButton("Find")); buttons.add(findButton = new JButton(_("Find")));
} else { } else {
buttons.add(findButton = new JButton("Find")); buttons.add(findButton = new JButton(_("Find")));
buttons.add(replaceFindButton = new JButton("Replace & Find")); buttons.add(replaceFindButton = new JButton(_("Replace & Find")));
buttons.add(replaceButton = new JButton("Replace")); buttons.add(replaceButton = new JButton(_("Replace")));
buttons.add(replaceAllButton = new JButton("Replace All")); buttons.add(replaceAllButton = new JButton(_("Replace All")));
} }
pain.add(buttons); pain.add(buttons);

View File

@ -0,0 +1,33 @@
/*
* by Shigeru KANEMOTO at SWITCHSCIENCE.
*
* Extract strings to be translated by:
* % xgettext -L Java --from-code=utf-8 -k_ -d Resources_ja *.java
* Extract and merge by:
* % xgettext -j -L Java --from-code=utf-8 -k_ -d Resources_ja *.java
*
* Edit "Resources_ja.po".
* Convert to the properties file format by:
* % msgcat -p Resources_ja.po > Resources_ja.properties
*/
package processing.app;
import java.util.*;
import java.text.MessageFormat;
public class I18n {
private static ResourceBundle i18n = ResourceBundle.getBundle("processing.app.Resources");
public static String _(String s) {
try {
return i18n.getString(s);
}
catch (MissingResourceException e) {
return s;
}
}
public static String format(String fmt, Object ... args) {
return MessageFormat.format(fmt, args);
}
}

View File

@ -21,6 +21,7 @@
*/ */
package processing.app; package processing.app;
import static processing.app.I18n._;
import java.io.File; import java.io.File;
@ -163,10 +164,8 @@ public class Platform {
protected void showLauncherWarning() { protected void showLauncherWarning() {
Base.showWarning("No launcher available", Base.showWarning(_("No launcher available"),
"Unspecified platform, no launcher available.\n" + _("Unspecified platform, no launcher available.\nTo enable opening URLs or folders, add a \n\"launcher=/path/to/app\" line to preferences.txt"),
"To enable opening URLs or folders, add a \n" +
"\"launcher=/path/to/app\" line to preferences.txt",
null); null);
} }
} }

View File

@ -32,6 +32,7 @@ import javax.swing.*;
import processing.app.syntax.*; import processing.app.syntax.*;
import processing.core.*; import processing.core.*;
import static processing.app.I18n._;
@ -72,11 +73,11 @@ public class Preferences {
// prompt text stuff // prompt text stuff
static final String PROMPT_YES = "Yes"; static final String PROMPT_YES = _("Yes");
static final String PROMPT_NO = "No"; static final String PROMPT_NO = _("No");
static final String PROMPT_CANCEL = "Cancel"; static final String PROMPT_CANCEL = _("Cancel");
static final String PROMPT_OK = "OK"; static final String PROMPT_OK = _("OK");
static final String PROMPT_BROWSE = "Browse"; static final String PROMPT_BROWSE = _("Browse");
/** /**
* Standardized width for buttons. Mac OS X 10.3 wants 70 as its default, * Standardized width for buttons. Mac OS X 10.3 wants 70 as its default,
@ -144,8 +145,8 @@ public class Preferences {
try { try {
load(Base.getLibStream("preferences.txt")); load(Base.getLibStream("preferences.txt"));
} catch (Exception e) { } catch (Exception e) {
Base.showError(null, "Could not read default settings.\n" + Base.showError(null, _("Could not read default settings.\n" +
"You'll need to reinstall Arduino.", e); "You'll need to reinstall Arduino."), e);
} }
// check for platform-specific properties in the defaults // check for platform-specific properties in the defaults
@ -174,9 +175,11 @@ public class Preferences {
load(new FileInputStream(commandLinePrefs)); load(new FileInputStream(commandLinePrefs));
} catch (Exception poe) { } catch (Exception poe) {
Base.showError("Error", Base.showError(_("Error"),
"Could not read preferences from " + I18n.format(
commandLinePrefs, poe); _("Could not read preferences from {0}"),
commandLinePrefs
), poe);
} }
} else if (!Base.isCommandLine()) { } else if (!Base.isCommandLine()) {
// next load user preferences file // next load user preferences file
@ -193,11 +196,13 @@ public class Preferences {
load(new FileInputStream(preferencesFile)); load(new FileInputStream(preferencesFile));
} catch (Exception ex) { } catch (Exception ex) {
Base.showError("Error reading preferences", Base.showError(_("Error reading preferences"),
"Error reading the preferences file. " + I18n.format(
"Please delete (or move)\n" + _("Error reading the preferences file. " +
preferencesFile.getAbsolutePath() + "Please delete (or move)\n" +
" and restart Arduino.", ex); "{0} and restart Arduino."),
preferencesFile.getAbsolutePath()
), ex);
} }
} }
} }
@ -209,7 +214,7 @@ public class Preferences {
// setup dialog for the prefs // setup dialog for the prefs
//dialog = new JDialog(editor, "Preferences", true); //dialog = new JDialog(editor, "Preferences", true);
dialog = new JFrame("Preferences"); dialog = new JFrame(_("Preferences"));
dialog.setResizable(false); dialog.setResizable(false);
Container pain = dialog.getContentPane(); Container pain = dialog.getContentPane();
@ -229,7 +234,7 @@ public class Preferences {
// Sketchbook location: // Sketchbook location:
// [...............................] [ Browse ] // [...............................] [ Browse ]
label = new JLabel("Sketchbook location:"); label = new JLabel(_("Sketchbook location:"));
pain.add(label); pain.add(label);
d = label.getPreferredSize(); d = label.getPreferredSize();
label.setBounds(left, top, d.width, d.height); label.setBounds(left, top, d.width, d.height);
@ -244,7 +249,7 @@ public class Preferences {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
File dflt = new File(sketchbookLocationField.getText()); File dflt = new File(sketchbookLocationField.getText());
File file = File file =
Base.selectFolder("Select new sketchbook location", dflt, dialog); Base.selectFolder(_("Select new sketchbook location"), dflt, dialog);
if (file != null) { if (file != null) {
sketchbookLocationField.setText(file.getAbsolutePath()); sketchbookLocationField.setText(file.getAbsolutePath());
} }
@ -268,11 +273,11 @@ public class Preferences {
// Editor font size [ ] // Editor font size [ ]
Container box = Box.createHorizontalBox(); Container box = Box.createHorizontalBox();
label = new JLabel("Editor font size: "); label = new JLabel(_("Editor font size: "));
box.add(label); box.add(label);
fontSizeField = new JTextField(4); fontSizeField = new JTextField(4);
box.add(fontSizeField); box.add(fontSizeField);
label = new JLabel(" (requires restart of Arduino)"); label = new JLabel(_(" (requires restart of Arduino)"));
box.add(label); box.add(label);
pain.add(box); pain.add(box);
d = box.getPreferredSize(); d = box.getPreferredSize();
@ -285,11 +290,11 @@ public class Preferences {
// Show verbose output during: [ ] compilation [ ] upload // Show verbose output during: [ ] compilation [ ] upload
box = Box.createHorizontalBox(); box = Box.createHorizontalBox();
label = new JLabel("Show verbose output during: "); label = new JLabel(_("Show verbose output during: "));
box.add(label); box.add(label);
verboseCompilationBox = new JCheckBox("compilation "); verboseCompilationBox = new JCheckBox(_("compilation "));
box.add(verboseCompilationBox); box.add(verboseCompilationBox);
verboseUploadBox = new JCheckBox("upload"); verboseUploadBox = new JCheckBox(_("upload"));
box.add(verboseUploadBox); box.add(verboseUploadBox);
pain.add(box); pain.add(box);
d = box.getPreferredSize(); d = box.getPreferredSize();
@ -300,7 +305,7 @@ public class Preferences {
// [ ] Delete previous applet or application folder on export // [ ] Delete previous applet or application folder on export
deletePreviousBox = deletePreviousBox =
new JCheckBox("Delete previous applet or application folder on export"); new JCheckBox(_("Delete previous applet or application folder on export"));
pain.add(deletePreviousBox); pain.add(deletePreviousBox);
d = deletePreviousBox.getPreferredSize(); d = deletePreviousBox.getPreferredSize();
deletePreviousBox.setBounds(left, top, d.width + 10, d.height); deletePreviousBox.setBounds(left, top, d.width + 10, d.height);
@ -310,7 +315,7 @@ public class Preferences {
// [ ] Use external editor // [ ] Use external editor
externalEditorBox = new JCheckBox("Use external editor"); externalEditorBox = new JCheckBox(_("Use external editor"));
pain.add(externalEditorBox); pain.add(externalEditorBox);
d = externalEditorBox.getPreferredSize(); d = externalEditorBox.getPreferredSize();
externalEditorBox.setBounds(left, top, d.width + 10, d.height); externalEditorBox.setBounds(left, top, d.width + 10, d.height);
@ -320,7 +325,7 @@ public class Preferences {
// [ ] Check for updates on startup // [ ] Check for updates on startup
checkUpdatesBox = new JCheckBox("Check for updates on startup"); checkUpdatesBox = new JCheckBox(_("Check for updates on startup"));
pain.add(checkUpdatesBox); pain.add(checkUpdatesBox);
d = checkUpdatesBox.getPreferredSize(); d = checkUpdatesBox.getPreferredSize();
checkUpdatesBox.setBounds(left, top, d.width + 10, d.height); checkUpdatesBox.setBounds(left, top, d.width + 10, d.height);
@ -329,7 +334,7 @@ public class Preferences {
// [ ] Update sketch files to new extension on save (.pde -> .ino) // [ ] Update sketch files to new extension on save (.pde -> .ino)
updateExtensionBox = new JCheckBox("Update sketch files to new extension on save (.pde -> .ino)"); updateExtensionBox = new JCheckBox(_("Update sketch files to new extension on save (.pde -> .ino)"));
pain.add(updateExtensionBox); pain.add(updateExtensionBox);
d = updateExtensionBox.getPreferredSize(); d = updateExtensionBox.getPreferredSize();
updateExtensionBox.setBounds(left, top, d.width + 10, d.height); updateExtensionBox.setBounds(left, top, d.width + 10, d.height);
@ -340,7 +345,7 @@ public class Preferences {
if (Base.isWindows()) { if (Base.isWindows()) {
autoAssociateBox = autoAssociateBox =
new JCheckBox("Automatically associate .ino files with Arduino"); new JCheckBox(_("Automatically associate .ino files with Arduino"));
pain.add(autoAssociateBox); pain.add(autoAssociateBox);
d = autoAssociateBox.getPreferredSize(); d = autoAssociateBox.getPreferredSize();
autoAssociateBox.setBounds(left, top, d.width + 10, d.height); autoAssociateBox.setBounds(left, top, d.width + 10, d.height);
@ -351,7 +356,7 @@ public class Preferences {
// More preferences are in the ... // More preferences are in the ...
label = new JLabel("More preferences can be edited directly in the file"); label = new JLabel(_("More preferences can be edited directly in the file"));
pain.add(label); pain.add(label);
d = label.getPreferredSize(); d = label.getPreferredSize();
label.setForeground(Color.gray); label.setForeground(Color.gray);
@ -380,7 +385,7 @@ public class Preferences {
right = Math.max(right, left + d.width); right = Math.max(right, left + d.width);
top += d.height; top += d.height;
label = new JLabel("(edit only when Arduino is not running)"); label = new JLabel(_("(edit only when Arduino is not running)"));
pain.add(label); pain.add(label);
d = label.getPreferredSize(); d = label.getPreferredSize();
label.setForeground(Color.gray); label.setForeground(Color.gray);
@ -528,7 +533,7 @@ public class Preferences {
set("editor.font", PApplet.join(pieces, ',')); set("editor.font", PApplet.join(pieces, ','));
} catch (Exception e) { } catch (Exception e) {
System.err.println("ignoring invalid font size " + newSizeText); System.err.println(I18n.format(_("ignoring invalid font size {0}"), newSizeText));
} }
if (autoAssociateBox != null) { if (autoAssociateBox != null) {

View File

@ -0,0 +1,13 @@
/*
* by Shigeru KANEMOTO at SWITCHSCIENCE.
* on 2011-10-15
*/
package processing.app;
import java.util.ListResourceBundle;
public class Resources extends ListResourceBundle {
protected Object[][] getContents() {
return new Object[][] {}; // Empty
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,936 @@
# Japanese language resource for the Arduino IDE.
# Copyright (C) 2011 switch-science.com
# This file is distributed under the same license as the Arduino IDE package.
# Shigeru KANEMOTO <c2drQHN3aXRjaC1zY2llbmNlLmNvbQ==>.
#
#, fuzzy
!=Project-Id-Version\: PACKAGE VERSION\nReport-Msgid-Bugs-To\: \nPOT-Creation-Date\: 2011-10-11 23\:09+0900\nPO-Revision-Date\: YEAR-MO-DA HO\:MI+ZONE\nLast-Translator\: Shigeru KANEMOTO <c2drQHN3aXRjaC1zY2llbmNlLmNvbQ\=\=>\nLanguage-Team\: \nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\n
#: SketchCode.java:83
#, java-format
Error\ while\ loading\ code\ {0}=\u300c{0}\u300d\u304b\u3089\u306e\u30b3\u30fc\u30c9\u8aad\u307f\u8fbc\u307f\u306e\u969b\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002
#: SketchCode.java:258
#, java-format
"{0}"\ contains\ unrecognized\ characters.If\ this\ code\ was\ created\ with\ an\ older\ version\ of\ Processing,you\ may\ need\ to\ use\ Tools\ ->\ Fix\ Encoding\ &\ Reload\ to\ updatethe\ sketch\ to\ use\ UTF-8\ encoding.\ If\ not,\ you\ may\ need\ todelete\ the\ bad\ characters\ to\ get\ rid\ of\ this\ warning.=\u300c{0}\u300d\u306b\u306f\u3001\u8a8d\u8b58\u3067\u304d\u306a\u3044\u6587\u5b57\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002\u3082\u3057\u3082\u3001\u53e4\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u306eIDE\u3067\u3053\u306e\u30b9\u30b1\u30c3\u30c1\u3092\u4f5c\u6210\u3057\u3066\u3044\u305f\u5834\u5408\u306b\u306f\u3001\u300c\u30c4\u30fc\u30eb\u300d\u30e1\u30cb\u30e5\u30fc\u306e\u300c\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u306e\u4fee\u6b63\u300d\u3092\u5b9f\u884c\u3059\u308b\u4e8b\u306b\u3088\u3063\u3066\u3001\u30d5\u30a1\u30a4\u30eb\u306e\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3092UTF-8\u306b\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u305d\u3046\u3067\u306a\u3044\u5834\u5408\u306b\u306f\u3001\u3053\u308c\u3089\u306e\u8a8d\u8b58\u3067\u304d\u306a\u3044\u6587\u5b57\u3092\u624b\u4f5c\u696d\u3067\u524a\u9664\u3057\u3066\u3044\u305f\u3060\u304f\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002
#: Preferences.java:76 UpdateCheck.java:108
Yes=\u306f\u3044
#: Preferences.java:77 UpdateCheck.java:108
No=\u3044\u3044\u3048
#: Preferences.java:78 Sketch.java:589 Sketch.java:741 Sketch.java:1046
#: Editor.java:2002 Editor.java:2083 Editor.java:2403
Cancel=\u30ad\u30e3\u30f3\u30bb\u30eb
#: Preferences.java:79 Sketch.java:589 Sketch.java:741 Sketch.java:1046
#: Editor.java:2083 Editor.java:2403
!OK=
#: Preferences.java:80
Browse=\u53c2\u7167
#: Preferences.java:148
Could\ not\ read\ default\ settings.\nYou'll\ need\ to\ reinstall\ Arduino.=\u65e2\u5b9a\u306e\u8a2d\u5b9a\u3092\u8aad\u307f\u8fbc\u3080\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002\nArduino IDE\u3092\u3082\u3046\u4e00\u5ea6\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304f\u3060\u3055\u3044\u3002
#: Preferences.java:178 Base.java:1857 Sketch.java:479 Sketch.java:485
#: Sketch.java:500 Sketch.java:507 Sketch.java:530 Sketch.java:547
#: Editor.java:2105 Editor.java:2116 Editor.java:2126 Editor.java:2144
Error=\u30a8\u30e9\u30fc
#: Preferences.java:180
#, java-format
Could\ not\ read\ preferences\ from\ {0}=\u300c{0}\u300d\u304b\u3089\u8a2d\u5b9a\u3092\u8aad\u307f\u8fbc\u3081\u307e\u305b\u3093\u3067\u3057\u305f\u3002
#: Preferences.java:199
Error\ reading\ preferences=\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u8fbc\u3080\u969b\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002
#: Preferences.java:201
#, java-format
Error\ reading\ the\ preferences\ file.\ Please\ delete\ (or\ move)\n{0}\ and\ restart\ Arduino.=\u521d\u671f\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u8fbc\u3080\u969b\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u300c{0}\u300d\u3092\u524a\u9664\u307e\u305f\u306f\u79fb\u52d5\u3057\u3066\u304b\u3089\u3001Arduino IDE\u3092\u518d\u8d77\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002
#: Preferences.java:217 Editor.java:584
Preferences=\u74b0\u5883\u8a2d\u5b9a
#: Preferences.java:237
Sketchbook\ location\:=\u30b9\u30b1\u30c3\u30c1\u30d6\u30c3\u30af\u306e\u4fdd\u5b58\u5834\u6240\uff1a
#: Preferences.java:252
Select\ new\ sketchbook\ location=\u30b9\u30b1\u30c3\u30c1\u30d6\u30c3\u30af\u306e\u4fdd\u5b58\u5834\u6240\u3092\u6c7a\u3081\u3066\u304f\u3060\u3055\u3044
#: Preferences.java:276
Editor\ font\ size\:\ =\u30a8\u30c7\u30a3\u30bf\u306e\u6587\u5b57\u306e\u5927\u304d\u3055\uff1a
#: Preferences.java:280
\ \ (requires\ restart\ of\ Arduino)=\uff08\u5909\u66f4\u306e\u53cd\u6620\u306b\u306f\u3001Arduino IDE\u306e\u518d\u8d77\u52d5\u304c\u5fc5\u8981\u3002\uff09
#: Preferences.java:293
Show\ verbose\ output\ during\:\ =\u3088\u308a\u8a73\u7d30\u306a\u60c5\u5831\u3092\u8868\u793a\u3059\u308b\uff1a
#: Preferences.java:295
compilation\ =\u30b3\u30f3\u30d1\u30a4\u30eb
#: Preferences.java:297
upload=\u66f8\u304d\u8fbc\u307f
#: Preferences.java:308
Delete\ previous\ applet\ or\ application\ folder\ on\ export=\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u306e\u524d\u306b\u3001\u30b3\u30f3\u30d1\u30a4\u30eb\u3067\u751f\u6210\u3055\u308c\u305f\u30d5\u30a9\u30eb\u30c0\u3092\u524a\u9664\u3059\u308b
#: Preferences.java:318
Use\ external\ editor=\u5916\u90e8\u306e\u30a8\u30c7\u30a3\u30bf\u3092\u4f7f\u7528\u3059\u308b\u3002
#: Preferences.java:328
Check\ for\ updates\ on\ startup=\u8d77\u52d5\u6642\u306b\u6700\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u6709\u7121\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u3002
#: Preferences.java:337
Update\ sketch\ files\ to\ new\ extension\ on\ save\ (.pde\ ->\ .ino)=\u30b9\u30b1\u30c3\u30c1\u3092\u4fdd\u5b58\u3059\u308b\u969b\u306b\u3001\u62e1\u5f35\u5b50\u3092.pde\u304b\u3089.ino\u306b\u5909\u66f4\u3059\u308b
#: Preferences.java:348
Automatically\ associate\ .ino\ files\ with\ Arduino=.ino\u30d5\u30a1\u30a4\u30eb\u3092Arduino IDE\u306b\u95a2\u9023\u3065\u3051\u308b\u3002
#: Preferences.java:359
More\ preferences\ can\ be\ edited\ directly\ in\ the\ file=\u4ee5\u4e0b\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u76f4\u63a5\u7de8\u96c6\u3059\u308c\u3070\u3001\u3088\u308a\u591a\u304f\u306e\u8a2d\u5b9a\u3092\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002
#: Preferences.java:388
(edit\ only\ when\ Arduino\ is\ not\ running)=\uff08\u7de8\u96c6\u3059\u308b\u969b\u306b\u306f\u3001Arduino IDE\u3092\u7d42\u4e86\u3055\u305b\u3066\u304a\u3044\u3066\u304f\u3060\u3055\u3044\u3002\uff09
#: Preferences.java:536
#, java-format
ignoring\ invalid\ font\ size\ {0}=\u30d5\u30a9\u30f3\u30c8\u30b5\u30a4\u30ba\u306e\u6307\u5b9a\u300c{0}\u300d\u304c\u7570\u5e38\u306a\u306e\u3067\u7121\u8996\u3057\u307e\u3059\u3002
#: UpdateCheck.java:53
!http\://www.arduino.cc/latest.txt=
#: UpdateCheck.java:103
A\ new\ version\ of\ Arduino\ is\ available,\nwould\ you\ like\ to\ visit\ the\ Arduino\ download\ page?=Arduino IDE\u306e\u65b0\u3057\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u5165\u624b\u53ef\u80fd\u306b\u306a\u308a\u307e\u3057\u305f\u3002\n\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u30da\u30fc\u30b8\u3092\u958b\u304d\u307e\u3059\u304b\uff1f
#: UpdateCheck.java:111
Update=\u66f4\u65b0
#: UpdateCheck.java:118
!http\://www.arduino.cc/en/Main/Software=
#: Base.java:181
Non-fatal\ error\ while\ setting\ the\ Look\ &\ Feel.=GUI\u306e\u6319\u52d5\u3092\u8a2d\u5b9a\u3059\u308b\u969b\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u304c\u3001\u91cd\u5927\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002
#: Base.java:182
The\ error\ message\ follows,\ however\ Arduino\ should\ run\ fine.=\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002Arduino IDE\u306e\u52d5\u4f5c\u306b\u554f\u984c\u306f\u3042\u308a\u307e\u305b\u3093\u3002
#: Base.java:217
Problem\ Setting\ the\ Platform=\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3092\u8a2d\u5b9a\u3059\u308b\u969b\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002
#: Base.java:218
An\ unknown\ error\ occurred\ while\ trying\ to\ load\nplatform-specific\ code\ for\ your\ machine.=\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u4f9d\u5b58\u306e\u6a5f\u80fd\u3092\u8aad\u307f\u8fbc\u3080\u969b\u306b\u3001\n\u4f55\u3089\u304b\u306e\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002
#: Base.java:229
Please\ install\ JDK\ 1.5\ or\ later=JDK\u306e\u30d0\u30fc\u30b8\u30e7\u30f31.5\u4ee5\u964d\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304f\u3060\u3055\u3044\u3002
#: Base.java:230
Arduino\ requires\ a\ full\ JDK\ (not\ just\ a\ JRE)\nto\ run.\ Please\ install\ JDK\ 1.5\ or\ later.\nMore\ information\ can\ be\ found\ in\ the\ reference.=Arduino IDE\u3092\u5b9f\u884c\u3059\u308b\u306b\u306fJDK\u304c\u5fc5\u8981\u3067\u3059\u3002\nJRE\u3067\u306f\u52d5\u4f5c\u3057\u307e\u305b\u3093\u3002\nJDK\u306e\u30d0\u30fc\u30b8\u30e7\u30f31.5\u4ee5\u964d\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n\u8a73\u3057\u304f\u306f\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u30de\u30cb\u30e5\u30a2\u30eb\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002
#: Base.java:254
Sketchbook\ folder\ disappeared=\u30b9\u30b1\u30c3\u30c1\u30d6\u30c3\u30af\u306e\u4fdd\u5b58\u5834\u6240\u30d5\u30a9\u30eb\u30c0\u304c\u7121\u304f\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u3002
#: Base.java:255
!The\ sketchbook\ folder\ no\ longer\ exists.\nArduino\ will\ switch\ to\ the\ default\ sketchbook\nlocation,\ and\ create\ a\ new\ sketchbook\ folder\ if\nnecessary.\ Arduino\ will\ then\ stop\ talking\ about\nhimself\ in\ the\ third\ person.=
#: Base.java:529
Time\ for\ a\ Break=\u305d\u308d\u305d\u308d\u4f11\u307f\u307e\u3057\u3087\u3046
#: Base.java:530
You've\ reached\ the\ limit\ for\ auto\ naming\ of\ new\ sketches\nfor\ the\ day.\ How\ about\ going\ for\ a\ walk\ instead?=\u4eca\u65e5\u306f\u3082\u3046\u3001\u3053\u308c\u4ee5\u4e0a\u3001\u65b0\u3057\u3044\u30b9\u30b1\u30c3\u30c1\u306b\u81ea\u52d5\u7684\u306b\u540d\u524d\u3092\u4ed8\u3051\u308b\n\u4e8b\u304c\u3067\u304d\u307e\u305b\u3093\u3002\u305d\u308d\u305d\u308d\u3001\u304a\u4f11\u307f\u306b\u3057\u307e\u305b\u3093\u304b\uff1f
#: Base.java:534
Sunshine=\u7d42\u308f\u308a\u306b\u3057\u307e\u3057\u3087\u3046
#: Base.java:535
No\ really,\ time\ for\ some\ fresh\ air\ for\ you.=\u5148\u7a0b\u3082\u6307\u6458\u3057\u305f\u3088\u3046\u306b\u3001\u4eca\u65e5\u306f\u9811\u5f35\u308a\u3059\u304e\u3067\u3059\u3002
#: Base.java:630
Open\ an\ Arduino\ sketch...=Arduino\u306e\u30b9\u30b1\u30c3\u30c1\u3092\u958b\u304f...
#: Base.java:769
!<html>\ <head>\ <style\ type\="text/css">b\ {\ font\:\ 13pt\ "Lucida\ Grande"\ }p\ {\ font\:\ 11pt\ "Lucida\ Grande";\ margin-top\:\ 8px\ }</style>\ </head><b>Are\ you\ sure\ you\ want\ to\ Quit?</b><p>Closing\ the\ last\ open\ sketch\ will\ quit\ Arduino.=
#: Base.java:779 Editor.java:594
Quit=\u7d42\u4e86
#: Base.java:900 Editor.java:502
Open...=\u958b\u304f...
#: Base.java:967
Contributed=\u30e6\u30fc\u30b6\u63d0\u4f9b
#: Base.java:1091
Sketch\ Does\ Not\ Exist=\u30b9\u30b1\u30c3\u30c1\u304c\u5b58\u5728\u3057\u307e\u305b\u3093\u3002
#: Base.java:1092
The\ selected\ sketch\ no\ longer\ exists.\nYou\ may\ need\ to\ restart\ Arduino\ to\ update\nthe\ sketchbook\ menu.=\u9078\u629e\u3057\u305f\u30b9\u30b1\u30c3\u30c1\u304c\u5b58\u5728\u3057\u307e\u305b\u3093\u3002\n\u30b9\u30b1\u30c3\u30c1\u30d6\u30c3\u30af\u30e1\u30cb\u30e5\u30fc\u3092\u66f4\u65b0\u3059\u308b\u306b\u306fArduino IDE\u3092\u518d\u8d77\u52d5\u3057\u3066\u4e0b\u3055\u3044\u3002
#: Base.java:1121
#, java-format
The\ sketch\ "{0}"\ cannot\ be\ used.\nSketch\ names\ must\ contain\ only\ basic\ letters\ and\ numbers\n(ASCII-only\ with\ no\ spaces,\ and\ it\ cannot\ start\ with\ a\ number).\nTo\ get\ rid\ of\ this\ message,\ remove\ the\ sketch\ from\n{1}=\u300c{0}\u300d\u3068\u3044\u3046\u540d\u524d\u3092\u30b9\u30b1\u30c3\u30c1\u306b\u4ed8\u3051\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\u3002\n\u30b9\u30b1\u30c3\u30c1\u540d\u306b\u306f\u534a\u89d2\u6587\u5b57\u3068\u6570\u5b57\u306e\u307f\u304c\u4f7f\u7528\u53ef\u80fd\u3067\u3059\u3002\n\uff08ASCII\u6587\u5b57\u306e\u307f\u3001\u30b9\u30da\u30fc\u30b9\u3092\u9664\u304d\u307e\u3059\u3002\u6570\u5b57\u3067\u59cb\u307e\u308b\u540d\u524d\u306f\u4f7f\u3048\u307e\u305b\u3093\u3002\uff09\n\u3053\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8868\u793a\u3057\u306a\u3044\u3088\u3046\u306b\u3059\u308b\u306b\u306f\u3001\u300c{1}\u300d\u304b\u3089\u30b9\u30b1\u30c3\u30c1\u3092\u524a\u9664\n\u3057\u3066\u4e0b\u3055\u3044\u3002
#: Base.java:1128
Ignoring\ sketch\ with\ bad\ name=\u4f7f\u7528\u3067\u304d\u306a\u3044\u540d\u524d\u306e\u30b9\u30b1\u30c3\u30c1\u306f\u7121\u8996\u3057\u307e\u3059\u3002
#: Base.java:1198
#, java-format
The\ library\ "{0}"\ cannot\ be\ used.\nLibrary\ names\ must\ contain\ only\ basic\ letters\ and\ numbers.\n(ASCII\ only\ and\ no\ spaces,\ and\ it\ cannot\ start\ with\ a\ number)=\u300c{0}\u300d\u3068\u3044\u3046\u540d\u524d\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u306f\u4f7f\u7528\u3067\u304d\u307e\u305b\u3093\u3002\n\u30e9\u30a4\u30d6\u30e9\u30ea\u540d\u306b\u306f\u534a\u89d2\u6587\u5b57\u3068\u6570\u5b57\u306e\u307f\u304c\u4f7f\u7528\u53ef\u80fd\u3067\u3059\u3002\n\uff08ASCII\u6587\u5b57\u306e\u307f\u3001\u30b9\u30da\u30fc\u30b9\u3092\u9664\u304d\u307e\u3059\u3002\u6570\u5b57\u3067\u59cb\u307e\u308b\u540d\u524d\u306f\u4f7f\u3048\u307e\u305b\u3093\u3002\uff09
#: Base.java:1203
Ignoring\ bad\ library\ name=\u4f7f\u7528\u3067\u304d\u306a\u3044\u30d5\u30a1\u30a4\u30eb\u540d\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u306f\u7121\u8996\u3057\u307e\u3059\u3002
#: Base.java:1428
Problem\ getting\ data\ folder=\u30c7\u30fc\u30bf\u30d5\u30a9\u30eb\u30c0\u3092\u8aad\u307f\u8fbc\u3081\u307e\u305b\u3093\u3002
#: Base.java:1429
Error\ getting\ the\ Arduino\ data\ folder.=Arduino IDE\u30c7\u30fc\u30bf\u30d5\u30a9\u30eb\u30c0\u3092\u8aad\u307f\u8fbc\u3081\u307e\u305b\u3093\u3002
#: Base.java:1436
Settings\ issues=\u8a2d\u5b9a\u306b\u95a2\u3059\u308b\u554f\u984c
#: Base.java:1437
Arduino\ cannot\ run\ because\ it\ could\ not\ncreate\ a\ folder\ to\ store\ your\ settings.=\u8a2d\u5b9a\u3092\u4fdd\u5b58\u3059\u308b\u305f\u3081\u306e\u30d5\u30a9\u30eb\u30c0\u3092\u4f5c\u6210\u3067\u304d\u306a\u3044\u305f\u3081\u3001\u52d5\u4f5c\u3092\u505c\u6b62\u3057\u307e\u3059\u3002
#: Base.java:1598
You\ forgot\ your\ sketchbook=\u30b9\u30b1\u30c3\u30c1\u30d6\u30c3\u30af\u3092\u3069\u3053\u304b\u306b\u3084\u3063\u3061\u3083\u3044\u307e\u3057\u305f\u306d\u3002
#: Base.java:1599
Arduino\ cannot\ run\ because\ it\ could\ not\ncreate\ a\ folder\ to\ store\ your\ sketchbook.=\u30b9\u30b1\u30c3\u30c1\u30d6\u30c3\u30af\u3092\u4fdd\u5b58\u3059\u308b\u30d5\u30a9\u30eb\u30c0\u3092\u4f5c\u6210\u3067\u304d\u306a\u3044\u305f\u3081\u3001\u52d5\u4f5c\u3092\u505c\u6b62\u3057\u307e\u3059\u3002
#: Base.java:1619
Select\ (or\ create\ new)\ folder\ for\ sketches...=\u30b9\u30b1\u30c3\u30c1\u3092\u4fdd\u5b58\u3059\u308b\u30d5\u30a9\u30eb\u30c0\u3092\u9078\u629e\u3059\u308b\u304b\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044\u3002
#: Base.java:1643
Problem\ Opening\ URL=\u6307\u5b9a\u306eURL\u3092\u958b\u304f\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002
#: Base.java:1644
#, java-format
Could\ not\ open\ the\ URL\n{0}=URL\u300c{0}\u300d\u3092\u958b\u304f\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002
#: Base.java:1667
Problem\ Opening\ Folder=\u30d5\u30a9\u30eb\u30c0\u3092\u958b\u304f\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002
#: Base.java:1668
#, java-format
Could\ not\ open\ the\ folder\n{0}=\u30d5\u30a9\u30eb\u30c0\u300c{0}\u300d\u3092\u958b\u304f\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002
#: Base.java:1781
!Guide_MacOSX.html=
#: Base.java:1783
!Guide_Windows.html=
#: Base.java:1785
!http\://www.arduino.cc/playground/Learning/Linux=
#: Base.java:1790
!index.html=
#: Base.java:1795
!Guide_Environment.html=
#: Base.java:1800
!environment=
#: Base.java:1800
!platforms.html=
#: Base.java:1805
!Guide_Troubleshooting.html=
#: Base.java:1810
!FAQ.html=
#: Base.java:1822
Message=\u30e1\u30c3\u30bb\u30fc\u30b8
#: Base.java:1838
Warning=\u8b66\u544a
#: Base.java:2192
#, java-format
Could\ not\ remove\ old\ version\ of\ {0}=\u300c{0}\u300d\u306e\u53e4\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u524a\u9664\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002
#: Base.java:2202
#, java-format
Could\ not\ replace\ {0}=\u300c{0}\u300d\u3092\u7f6e\u304d\u63db\u3048\u308b\u4e8b\u304c\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002
#: Base.java:2243 Base.java:2266
#, java-format
Could\ not\ delete\ {0}=\u300c{0}\u300d\u3092\u524a\u9664\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002
#: EditorToolbar.java:41 EditorToolbar.java:46
Verify=\u691c\u8a3c
#: EditorToolbar.java:41 Editor.java:546
Upload=\u30de\u30a4\u30b3\u30f3\u30dc\u30fc\u30c9\u306b\u66f8\u304d\u8fbc\u3080
#: EditorToolbar.java:41 Editor.java:494
New=\u65b0\u898f\u30d5\u30a1\u30a4\u30eb
#: EditorToolbar.java:41
Open=\u958b\u304f
#: EditorToolbar.java:41 EditorToolbar.java:46 Editor.java:530
#: Editor.java:2002 Editor.java:2406
Save=\u4fdd\u5b58
#: EditorToolbar.java:41 EditorToolbar.java:46 Editor.java:670
Serial\ Monitor=\u30b7\u30ea\u30a2\u30eb\u30e2\u30cb\u30bf
#: EditorToolbar.java:46 Editor.java:554
Upload\ Using\ Programmer=\u66f8\u8fbc\u88c5\u7f6e\u3092\u4f7f\u3063\u3066\u66f8\u304d\u8fbc\u3080
#: EditorToolbar.java:46
New\ Editor\ Window=\u65b0\u898f\u30a6\u30a3\u30f3\u30c9\u30a6
#: EditorToolbar.java:46
Open\ in\ Another\ Window=\u65b0\u898f\u30a6\u30a3\u30f3\u30c9\u30a6\u3067\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u304f
#: Serial.java:147
#, java-format
Serial\ port\ ''{0}''\ already\ in\ use.\ Try\ quiting\ any\ programs\ that\ may\ be\ using\ it.=\u30b7\u30ea\u30a2\u30eb\u30dd\u30fc\u30c8\u300c{0}\u300d\u306f\u3001\u307b\u304b\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u4f7f\u7528\u4e2d\u3067\u3059\u3002\u30b7\u30ea\u30a2\u30eb\u30dd\u30fc\u30c8\u3092\u4f7f\u3063\u3066\u3044\u308b\u53ef\u80fd\u6027\u306e\u3042\u308b\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u7d42\u4e86\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002
#: Serial.java:154
#, java-format
Error\ opening\ serial\ port\ ''{0}''.=\u30b7\u30ea\u30a2\u30eb\u30dd\u30fc\u30c8\u300c{0}\u300d\u304c\u958b\u3051\u307e\u305b\u3093\u3002
#: Serial.java:167
#, java-format
Serial\ port\ ''{0}''\ not\ found.\ Did\ you\ select\ the\ right\ one\ from\ the\ Tools\ >\ Serial\ Port\ menu?=\u30b7\u30ea\u30a2\u30eb\u30dd\u30fc\u30c8\u300c{0}\u300d\u304c\u5b58\u5728\u3057\u307e\u305b\u3093\u3002\u300c\u30c4\u30fc\u30eb\u300d\u30e1\u30cb\u30e5\u30fc\u306e\u300c\u30b7\u30ea\u30a2\u30eb\u30dd\u30fc\u30c8\u300d\u3067\u3001\u6b63\u3057\u3044\u30b7\u30ea\u30a2\u30eb\u30dd\u30fc\u30c8\u3092\u9078\u3093\u3067\u3042\u308a\u307e\u3059\u304b\uff1f
#: Serial.java:424
#, java-format
readBytesUntil()\ byte\ buffer\ is\ too\ small\ for\ the\ {0}\ bytes\ up\ to\ and\ including\ char\ {1}=readBytesUntil()\u3067\u6587\u5b57\u300c{1}\u300d\u304c\u898b\u3064\u304b\u308b\u307e\u3067\u8aad\u307f\u8fbc\u3082\u3046\u3068\u3057\u307e\u3057\u305f\u304c\u3001\u30d0\u30c3\u30d5\u30a1\u306e\u9577\u3055{0}\u30d0\u30a4\u30c8\u3067\u306f\u8db3\u308a\u307e\u305b\u3093\u3002
#: Serial.java:567
#, java-format
Error\ inside\ Serial.{0}()=Serial.{0}()\u3067\u30a8\u30e9\u30fc
#: Theme.java:52
Could\ not\ read\ color\ theme\ settings.\nYou'll\ need\ to\ reinstall\ Processing.=\u30ab\u30e9\u30fc\u30c6\u30fc\u30de\u306e\u8a2d\u5b9a\u3092\u8aad\u307f\u8fbc\u3081\u307e\u305b\u3093\u3002\nArduino IDE\u3092\u518d\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304f\u3060\u3055\u3044\u3002
#: EditorHeader.java:292
New\ Tab=\u65b0\u898f\u30bf\u30d6
#: EditorHeader.java:300
Rename=\u540d\u524d\u3092\u5909\u66f4
#: EditorHeader.java:314 Sketch.java:595
Delete=\u524a\u9664
#: EditorHeader.java:326
Previous\ Tab=\u524d\u306e\u30bf\u30d6
#: EditorHeader.java:340
Next\ Tab=\u6b21\u306e\u30bf\u30d6
#: SerialMonitor.java:91
Send=\u9001\u4fe1
#: SerialMonitor.java:108
Autoscroll=\u81ea\u52d5\u30b9\u30af\u30ed\u30fc\u30eb
#: SerialMonitor.java:110
No\ line\ ending=\u6539\u884c\u306a\u3057
#: SerialMonitor.java:110
Newline=LF\u306e\u307f
#: SerialMonitor.java:110
Carriage\ return=CR\u306e\u307f
#: SerialMonitor.java:110
Both\ NL\ &\ CR=CR\u304a\u3088\u3073LF
#: SerialMonitor.java:128 SerialMonitor.java:131
\ baud=\ bps
#: FindReplace.java:79
Find\:=\u691c\u7d22\u30c6\u30ad\u30b9\u30c8\uff1a
#: FindReplace.java:81
Replace\ with\:=\u7f6e\u63db\u30c6\u30ad\u30b9\u30c8\uff1a
#: FindReplace.java:121
Ignore\ Case=\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u3092\u533a\u5225\u3057\u306a\u3044
#: FindReplace.java:137 FindReplace.java:146
Replace\ All=\u5168\u3066\u7f6e\u63db
#: FindReplace.java:138 FindReplace.java:145 Sketch.java:1050
Replace=\u7f6e\u63db
#: FindReplace.java:139 FindReplace.java:144
Replace\ &\ Find=\u7f6e\u63db\u3057\u3066\u6b21
#: FindReplace.java:140 FindReplace.java:143
Find=\u691c\u7d22
#: Sketch.java:278 Sketch.java:307 Sketch.java:581 Sketch.java:970
Sketch\ is\ Read-Only=\u30b9\u30b1\u30c3\u30c1\u306b\u66f8\u304d\u8fbc\u3081\u307e\u305b\u3093\u3002
#: Sketch.java:279 Sketch.java:308 Sketch.java:582 Sketch.java:971
Some\ files\ are\ marked\ "read-only",\ so\ you'll\nneed\ to\ re-save\ the\ sketch\ in\ another\ location,\nand\ try\ again.=\u8aad\u8fbc\u5c02\u7528\u306b\u8a2d\u5b9a\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u304c\u3042\u308a\u307e\u3059\u3002\n\u30b9\u30b1\u30c3\u30c1\u3092\u5225\u306e\u5834\u6240\u306b\u4fdd\u5b58\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n
#: Sketch.java:286
Name\ for\ new\ file\:=\u65b0\u898f\u30d5\u30a1\u30a4\u30eb\u306e\u540d\u524d\uff1a
#: Sketch.java:298
Sketch\ is\ Untitled=\u30b9\u30b1\u30c3\u30c1\u306b\u306f\u3001\u307e\u3060\u540d\u524d\u304c\u3042\u308a\u307e\u305b\u3093\u3002
#: Sketch.java:299
How\ about\ saving\ the\ sketch\ first\ \nbefore\ trying\ to\ rename\ it?=\u30b9\u30b1\u30c3\u30c1\u306e\u540d\u524d\u3092\u5909\u66f4\u3059\u308b\u524d\u306b\u3001\u30b9\u30b1\u30c3\u30c1\u3092\u4fdd\u5b58\u3057\u307e\u3059\u304b\uff1f
#: Sketch.java:359 Sketch.java:366 Sketch.java:377
Problem\ with\ rename=\u540d\u524d\u3092\u5909\u66f4\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002
#: Sketch.java:360
The\ name\ cannot\ start\ with\ a\ period.=\u3053\u306e\u540d\u524d\u306e\u5148\u982d\u306f\u30d4\u30ea\u30aa\u30c9\u300c.\u300d\u306b\u3057\u3066\u306f\u3044\u3051\u307e\u305b\u3093\u3002
#: Sketch.java:368
#, java-format
".{0}"\ is\ not\ a\ valid\ extension.=\u62e1\u5f35\u5b50\u300c.{0}\u300d\u306f\u3001\u4f7f\u3048\u307e\u305b\u3093\u3002
#: Sketch.java:378
!The\ main\ file\ can't\ use\ an\ extension.\n(It\ may\ be\ time\ for\ your\ to\ graduate\ to\ a\n"real"\ programming\ environment)=
#: Sketch.java:400 Sketch.java:414 Sketch.java:423 Sketch.java:863
Nope=\u30c0\u30e1\u3002
#: Sketch.java:402
#, java-format
A\ file\ named\ "{0}"\ already\ exists\ in\ "{1}"=\u300c{0}\u300d\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u306f\u3001\u3059\u3067\u306b\u30d5\u30a9\u30eb\u30c0\u300c{1}\u300d\u5185\u306b\u5b58\u5728\u3057\u307e\u3059\u3002
#: Sketch.java:415
You\ can't\ have\ a\ .cpp\ file\ with\ the\ same\ name\ as\ the\ sketch.=\u30b9\u30b1\u30c3\u30c1\u3068\u540c\u3058\u540d\u524d\u306e.cpp\u30d5\u30a1\u30a4\u30eb\u306f\u4f7f\u3048\u307e\u305b\u3093\u3002
#: Sketch.java:425
You\ can't\ rename\ the\ sketch\ to\ "{0}"\nbecause\ the\ sketch\ already\ has\ a\ .cpp\ file\ with\ that\ name.=\u3053\u306e\u30b9\u30b1\u30c3\u30c1\u306b\u306f\u3001\u3059\u3067\u306b\u305d\u306e\u540d\u524d\u306e.cpp\u30d5\u30a1\u30a4\u30eb\u304c\u5b58\u5728\u3059\u308b\u305f\u3081\u3001\u30b9\u30b1\u30c3\u30c1\u306e\u540d\u524d\u3092\u300c{0}\u300d\u306b\u5909\u66f4\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u305b\u3093\u3002
#: Sketch.java:459
Cannot\ Rename=\u540d\u524d\u3092\u5909\u66f4\u3067\u304d\u307e\u305b\u3093\u3002
#: Sketch.java:461
#, java-format
Sorry,\ a\ sketch\ (or\ folder)\ named\ "{0}"\ already\ exists.=\u3059\u3067\u306b\u300c{0}\u300d\u3068\u3044\u3046\u540d\u524d\u306e\u30b9\u30b1\u30c3\u30c1\u307e\u305f\u306f\u30d5\u30a9\u30eb\u30c0\u304c\u5b58\u5728\u3057\u307e\u3059\u3002
#: Sketch.java:479
Could\ not\ rename\ the\ sketch.\ (0)=\u30b9\u30b1\u30c3\u30c1\u306e\u540d\u524d\u3092\u5909\u66f4\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002(0)
#: Sketch.java:487 Sketch.java:532
#, java-format
Could\ not\ rename\ "{0}"\ to\ "{1}"=\u300c{0}\u300d\u306e\u540d\u524d\u3092\u300c{1}\u300d\u306b\u5909\u66f4\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002
#: Sketch.java:500
Could\ not\ rename\ the\ sketch.\ (1)=\u30b9\u30b1\u30c3\u30c1\u306e\u540d\u524d\u3092\u5909\u66f4\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002(1)
#: Sketch.java:507
Could\ not\ rename\ the\ sketch.\ (2)=\u30b9\u30b1\u30c3\u30c1\u306e\u540d\u524d\u3092\u5909\u66f4\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002(2)
#: Sketch.java:544
createNewFile()\ returned\ false=createNewFile()\u304cfalse\u3092\u8fd4\u3057\u307e\u3057\u305f\u3002
#: Sketch.java:591
Are\ you\ sure\ you\ want\ to\ delete\ this\ sketch?=\u3053\u306e\u30b9\u30b1\u30c3\u30c1\u3092\u672c\u5f53\u306b\u524a\u9664\u3057\u307e\u3059\u304b\uff1f
#: Sketch.java:592
#, java-format
Are\ you\ sure\ you\ want\ to\ delete\ "{0}"?=\u300c{0}\u300d\u3092\u672c\u5f53\u306b\u524a\u9664\u3057\u307e\u3059\u304b\uff1f
#: Sketch.java:620
Couldn't\ do\ it=\u305d\u308c\u306f\u5b9f\u884c\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002
#: Sketch.java:621
#, java-format
Could\ not\ delete\ "{0}".=\u300c{0}\u300d\u3092\u524a\u9664\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002
#: Sketch.java:651
removeCode\:\ internal\ error..\ could\ not\ find\ code=removeCode\uff1a\u5185\u90e8\u30a8\u30e9\u30fc\u3001\u5bfe\u8c61\u306e\u30b3\u30fc\u30c9\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002
#: Sketch.java:724
Sketch\ is\ read-only=\u30b9\u30b1\u30c3\u30c1\u306b\u66f8\u304d\u8fbc\u3081\u307e\u305b\u3093\u3002
#: Sketch.java:725
Some\ files\ are\ marked\ "read-only",\ so\ you'll\nneed\ to\ re-save\ this\ sketch\ to\ another\ location.=\u66f8\u304d\u8fbc\u307f\u5148\u306e\u5834\u6240\u306b\u306f\u3001\u66f8\u304d\u8fbc\u307f\u7981\u6b62\u306e\u30d5\u30a1\u30a4\u30eb\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u305f\u3081\u3001\u3053\u306e\u30b9\u30b1\u30c3\u30c1\u306f\u5225\u306e\u5834\u6240\u306b\u4fdd\u5b58\u3057\u76f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002
#: Sketch.java:743
In\ Arduino\ 1.0,\ the\ default\ file\ extension\ has\ changed\nfrom\ .pde\ to\ .ino.\ \ New\ sketches\ (including\ those\ created\nby\ "Save-As"\ will\ use\ the\ new\ extension.\ \ The\ extension\nof\ existing\ sketches\ will\ be\ updated\ on\ save,\ but\ you\ can\ndisable\ this\ in\ the\ Preferences\ dialog.\n\nSave\ sketch\ and\ update\ its\ extension?=Arduino 1.0\u3067\u306f\u3001\u30b9\u30b1\u30c3\u30c1\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u62e1\u5f35\u5b50\u3092.pde\u304b\u3089.ino\u306b\n\u5909\u66f4\u3057\u307e\u3057\u305f\u3002\u65b0\u3057\u3044\u30b9\u30b1\u30c3\u30c1\u304a\u3088\u3073\u300c\u540d\u524d\u3092\u4ed8\u3051\u3066\u4fdd\u5b58\u300d\u3067\u4fdd\u5b58\n\u3057\u305f\u30b9\u30b1\u30c3\u30c1\u306b\u306f\u3001\u65b0\u3057\u3044\u62e1\u5f35\u5b50\u304c\u4f7f\u308f\u308c\u307e\u3059\u3002\u307e\u305f\u3001\u65e2\u5b58\u306e\u30b9\u30b1\u30c3\u30c1\n\u3092\u958b\u3044\u3066\u304b\u3089\u4fdd\u5b58\u3059\u308b\u3068\u3001\u65b0\u3057\u3044\u62e1\u5f35\u5b50\u306b\u81ea\u52d5\u7684\u306b\u5909\u66f4\u3055\u308c\u307e\u3059\u3002\n\u3053\u306e\u6a5f\u80fd\u306f\u3001\u300c\u74b0\u5883\u8a2d\u5b9a\u300d\u3067\u7121\u52b9\u306b\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002\n\n\u62e1\u5f35\u5b50\u3092\u5909\u66f4\u3057\u3066\u30b9\u30b1\u30c3\u30c1\u3092\u4fdd\u5b58\u3057\u307e\u3059\u304b\uff1f
#: Sketch.java:750
!.pde\ ->\ .ino=
#: Sketch.java:829
Save\ sketch\ folder\ as...=\u30b9\u30b1\u30c3\u30c1\u306e\u30d5\u30a9\u30eb\u30c0\u306e\u4fdd\u5b58\u5148...
#: Sketch.java:865
You\ can't\ save\ the\ sketch\ as\ "{0}"\nbecause\ the\ sketch\ already\ has\ a\ .cpp\ file\ with\ that\ name.=\u3053\u306e\u30b9\u30b1\u30c3\u30c1\u306b\u306f\u3001\u3059\u3067\u306b\u305d\u306e\u540d\u524d\u306e.cpp\u30d5\u30a1\u30a4\u30eb\u304c\u5b58\u5728\u3059\u308b\u305f\u3081\u3001\u30b9\u30b1\u30c3\u30c1\u3092\u300c{0}\u300d\u3068\u3057\u3066\u4fdd\u5b58\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3002
#: Sketch.java:886
How\ very\ Borges\ of\ you=\u305d\u308c\u306f\u30e0\u30ea\u3002
#: Sketch.java:887
You\ cannot\ save\ the\ sketch\ into\ a\ folder\ninside\ itself.\ This\ would\ go\ on\ forever.=\u81ea\u3089\u306e\u30b9\u30b1\u30c3\u30c1\u306e\u30d5\u30a9\u30eb\u30c0\u306e\u4e2d\u306b\u30b9\u30b1\u30c3\u30c1\u3092\u4fdd\u5b58\u3059\u308b\u3053\u3068\u306a\u3093\u3066\u3067\u304d\u307e\u305b\u3093\u3002\u7121\u9650\u30eb\u30fc\u30d7\u306b\u306a\u3063\u3061\u3083\u3044\u307e\u3059\u3002
#: Sketch.java:979
Select\ an\ image\ or\ other\ data\ file\ to\ copy\ to\ your\ sketch=\u753b\u50cf\u306a\u3069\u3001\u30b9\u30b1\u30c3\u30c1\u306e\u4e00\u90e8\u3068\u3057\u3066\u30b3\u30d4\u30fc\u3057\u3066\u52a0\u3048\u305f\u3044\u30d5\u30a1\u30a4\u30eb\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002
#: Sketch.java:996 Editor.java:377
One\ file\ added\ to\ the\ sketch.=\u30b9\u30b1\u30c3\u30c1\u306b\u30d5\u30a1\u30a4\u30eb\u30921\u500b\u8ffd\u52a0\u3057\u307e\u3057\u305f\u3002
#: Sketch.java:1047
#, java-format
Replace\ the\ existing\ version\ of\ {0}?=\u3059\u3067\u306b\u540c\u3058\u300c{0}\u300d\u3068\u3044\u3046\u540d\u524d\u306e\u30d5\u30a1\u30a4\u30eb\u304c\u30b9\u30b1\u30c3\u30c1\u306e\u4e2d\u306b\u3042\u308a\u307e\u3059\u304c\u3001\u7f6e\u304d\u63db\u3048\u307e\u3059\u304b\uff1f
#: Sketch.java:1069 Sketch.java:1092
Error\ adding\ file=\u30d5\u30a1\u30a4\u30eb\u3092\u8ffd\u52a0\u3059\u308b\u969b\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002
#: Sketch.java:1070
#, java-format
Could\ not\ delete\ the\ existing\ ''{0}''\ file.=\u65e2\u5b58\u306e\u300c{0}\u300d\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u3092\u524a\u9664\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002
#: Sketch.java:1078
You\ can't\ fool\ me=\u30d8\u30f3\u306a\u3053\u3068\u3057\u3061\u3083\u3060\u3081\u3002
#: Sketch.java:1079
This\ file\ has\ already\ been\ copied\ to\ the\nlocation\ from\ which\ where\ you're\ trying\ to\ add\ it.\nI\ ain't\ not\ doin\ nuthin'.=\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u3059\u3067\u306b\u30b3\u30d4\u30fc\u3055\u308c\u3066\u30b9\u30b1\u30c3\u30c1\u306e\u4e2d\u306b\u3042\u308a\u307e\u3059\u3002\u307e\u3060\u3001\u4f55\u3082\u3057\u3066\u307e\u305b\u3093\u3088\uff01
#: Sketch.java:1093
#, java-format
Could\ not\ add\ ''{0}''\ to\ the\ sketch.=\u30d5\u30a1\u30a4\u30eb\u300c{0}\u300d\u3092\u30b9\u30b1\u30c3\u30c1\u306b\u52a0\u3048\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002
#: Sketch.java:1359 Sketch.java:1390
Build\ folder\ disappeared\ or\ could\ not\ be\ written=\u30d3\u30eb\u30c9\u7528\u306e\u30d5\u30a9\u30eb\u30c0\u304c\u6d88\u3048\u3066\u3057\u307e\u3063\u305f\u304b\u3001\u66f8\u304d\u8fbc\u307f\u304c\u3067\u304d\u307e\u305b\u3093\u3002
#: Sketch.java:1374
Could\ not\ find\ main\ class=\u30e1\u30a4\u30f3\u306e\u30af\u30e9\u30b9\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002
#: Sketch.java:1399
#, java-format
Uncaught\ exception\ type\:\ {0}=\u60f3\u5b9a\u5916\u306e\u4f8b\u5916\u300c{0}\u300d\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002
#: Sketch.java:1431
#, java-format
Problem\ moving\ {0}\ to\ the\ build\ folder=\u300c{0}\u300d\u3092\u30d3\u30eb\u30c9\u30d5\u30a9\u30eb\u30c0\u306b\u79fb\u52d5\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002
#: Sketch.java:1631 Editor.java:1828
Compiling\ sketch...=\u30b9\u30b1\u30c3\u30c1\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u3044\u307e\u3059\u2026
#: Sketch.java:1645
Uploading...=\u30de\u30a4\u30b3\u30f3\u30dc\u30fc\u30c9\u306b\u66f8\u304d\u8fbc\u3093\u3067\u3044\u307e\u3059\u2026
#: Sketch.java:1668
#, java-format
Binary\ sketch\ size\:\ {0}\ bytes\ (of\ a\ {1}\ byte\ maximum)=\u30b3\u30f3\u30d1\u30a4\u30eb\u5f8c\u306e\u30b9\u30b1\u30c3\u30c1\u306e\u30b5\u30a4\u30ba\uff1a{0}\u30d0\u30a4\u30c8\uff08\u6700\u5927\u5bb9\u91cf{1}\u30d0\u30a4\u30c8\uff09
#: Sketch.java:1673
Couldn't\ determine\ program\ size\:\ {0}=\u30b3\u30f3\u30d1\u30a4\u30eb\u5f8c\u306e\u30b5\u30a4\u30ba\u304c\u308f\u304b\u308a\u307e\u305b\u3093\uff1a{0}
#: Sketch.java:1678
Sketch\ too\ big;\ see\ http\://www.arduino.cc/en/Guide/Troubleshooting\#size\ for\ tips\ on\ reducing\ it.=\u30b9\u30b1\u30c3\u30c1\u304c\u5927\u304d\u3059\u304e\u307e\u3059\u3002http\://www.arduino.cc/en/Guide/Troubleshooting\#size \u306b\u306f\u3001\u5c0f\u3055\u304f\u3059\u308b\u30b3\u30c4\u304c\u66f8\u3044\u3066\u3042\u308a\u307e\u3059\u3002
#: Sketch.java:1738
Missing\ the\ */\ from\ the\ end\ of\ a\ /*\ comment\ */=\u300c/* */\u300d\u5f62\u5f0f\u306e\u30b3\u30e1\u30f3\u30c8\u306e\u300c*/\u300d\u304c\u3042\u308a\u307e\u305b\u3093\u3002
#: Sketch.java:1780
Sketch\ Disappeared=\u30b9\u30b1\u30c3\u30c1\u304c\u6d88\u6ec5\u3057\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u3002
#: Sketch.java:1781
The\ sketch\ folder\ has\ disappeared.\n\ Will\ attempt\ to\ re-save\ in\ the\ same\ location,\nbut\ anything\ besides\ the\ code\ will\ be\ lost.=\u30b9\u30b1\u30c3\u30c1\u30d6\u30c3\u30af\u306e\u4fdd\u5b58\u5834\u6240\u30d5\u30a9\u30eb\u30c0\u304c\u7121\u304f\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u3002\n\u74b0\u5883\u8a2d\u5b9a\u3067\u6307\u5b9a\u3057\u3066\u3044\u308b\u4fdd\u5b58\u5834\u6240\u306b\u4fdd\u5b58\u3057\u76f4\u3057\u307e\u3059\u3002\n\u3053\u306e\u30b9\u30b1\u30c3\u30c1\u3068\u4e00\u7dd2\u306b\u4fdd\u5b58\u3057\u3066\u3044\u305f\u30d5\u30a1\u30a4\u30eb\u306f\u5931\u308f\u308c\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002
#: Sketch.java:1794
Could\ not\ re-save\ sketch=\u30b9\u30b1\u30c3\u30c1\u3092\u4fdd\u5b58\u3057\u76f4\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002
#: Sketch.java:1795
Could\ not\ properly\ re-save\ the\ sketch.\ You\ may\ be\ in\ trouble\ at\ this\ point,\nand\ it\ might\ be\ time\ to\ copy\ and\ paste\ your\ code\ to\ another\ text\ editor.=\u30b9\u30b1\u30c3\u30c1\u3092\u6b63\u5e38\u306b\u4fdd\u5b58\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002\n\u4fdd\u5b58\u5148\u306b\u554f\u984c\u304c\u3042\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002\n\u5225\u306e\u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30bf\u3067\u30b9\u30b1\u30c3\u30c1\u3092\u958b\u304d\u3001\u30b3\u30fc\u30c9\u3092\u30b3\u30d4\u30fc\uff06\u30da\u30fc\u30b9\u30c8\u3057\u3066\u5225\u306e\u30d5\u30a1\u30a4\u30eb\u306b\u4fdd\u5b58\u3059\u308b\u3053\u3068\u3092\u304a\u3059\u3059\u3081\u3057\u307e\u3059\u3002
#: Sketch.java:2044
The\ sketch\ name\ had\ to\ be\ modified.\ Sketch\ names\ can\ only\ consist\nof\ ASCII\ characters\ and\ numbers\ (but\ cannot\ start\ with\ a\ number).\nThey\ should\ also\ be\ less\ less\ than\ 64\ characters\ long.=\u90fd\u5408\u306b\u3088\u308a\u3001\u30b9\u30b1\u30c3\u30c1\u306e\u540d\u524d\u3092\u5909\u66f4\u3057\u307e\u3057\u305f\u3002\u30b9\u30b1\u30c3\u30c1\u306e\u540d\u524d\u306f\u3001ASCII\u6587\u5b57\u304a\u3088\u3073\u6570\u5b57\uff08\u5148\u982d\u3092\u9664\u304f\uff09\u3067\u3042\u308a\u3001\uff16\uff14\u6587\u5b57\u4ee5\u4e0b\u3067\u3042\u308b\u3053\u3068\u304c\u5fc5\u8981\u3067\u3059\u3002
#: EditorConsole.java:147
Console\ Error=\u30b3\u30f3\u30bd\u30fc\u30eb\u306e\u7570\u5e38
#: EditorConsole.java:148
A\ problem\ occurred\ while\ trying\ to\ open\ the\nfiles\ used\ to\ store\ the\ console\ output.=\u30b3\u30f3\u30bd\u30fc\u30eb\u51fa\u529b\u3092\u4fdd\u5b58\u3059\u308b\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u3053\u3046\u3068\u3057\u305f\u3089\u3001\n\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002
#: debug/Uploader.java:52
!https\://developer.berlios.de/bugs/?group_id\=3590=
#: debug/Uploader.java:54 debug/Compiler.java:43
#, java-format
Compiler\ error,\ please\ submit\ this\ code\ to\ {0}=\u30b3\u30f3\u30d1\u30a4\u30e9\u306e\u30a8\u30e9\u30fc\u3067\u3059\u3002\u554f\u984c\u306e\u8d77\u304d\u305f\u30b9\u30b1\u30c3\u30c1\u3092{0}\u306b\u9001\u3063\u3066\u304f\u3060\u3055\u3044\u3002
#: debug/Uploader.java:199
#, java-format
the\ selected\ serial\ port\ {0}\ does\ not\ exist\ or\ your\ board\ is\ not\ connected=\u30b7\u30ea\u30a2\u30eb\u30dd\u30fc\u30c8\u300c{0}\u300d\u304c\u9078\u629e\u3055\u308c\u3066\u3044\u307e\u3059\u304c\u3001\u305d\u306e\u30dd\u30fc\u30c8\u306f\u5b58\u5728\u3057\u306a\u3044\u304b\u3001\u30de\u30a4\u30b3\u30f3\u30dc\u30fc\u30c9\u304c\u63a5\u7d9a\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002
#: debug/Uploader.java:203
Device\ is\ not\ responding,\ check\ the\ right\ serial\ port\ is\ selected\ or\ RESET\ the\ board\ right\ before\ exporting=\u30de\u30a4\u30b3\u30f3\u30dc\u30fc\u30c9\u304c\u5fdc\u7b54\u3057\u307e\u305b\u3093\u3002\u30b7\u30ea\u30a2\u30eb\u30dd\u30fc\u30c8\u304c\u6b63\u3057\u304f\u9078\u629e\u3055\u308c\u3066\u3044\u308b\u4e8b\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u307e\u305f\u3001\u66f8\u304d\u8fbc\u307f\u306e\u76f4\u524d\u306b\u30de\u30a4\u30b3\u30f3\u30dc\u30fc\u30c9\u306e\u30ea\u30bb\u30c3\u30c8\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002
#: debug/Uploader.java:209
Problem\ uploading\ to\ board.\ \ See\ http\://www.arduino.cc/en/Guide/Troubleshooting\#upload\ for\ suggestions.=\u30de\u30a4\u30b3\u30f3\u30dc\u30fc\u30c9\u306b\u66f8\u304d\u8fbc\u3082\u3046\u3068\u3057\u307e\u3057\u305f\u304c\u3001\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\n\u3053\u306e\u30da\u30fc\u30b8\u3092\u53c2\u8003\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\nhttp\://www.arduino.cc/en/Guide/Troubleshooting\#upload
#: debug/Uploader.java:213
Wrong\ microcontroller\ found.\ \ Did\ you\ select\ the\ right\ board\ from\ the\ Tools\ >\ Board\ menu?=\u30de\u30a4\u30b3\u30f3\u30dc\u30fc\u30c9\u3068\u901a\u4fe1\u3057\u305f\u3068\u3053\u308d\u3001\u9078\u629e\u3068\u7570\u306a\u308b\u30de\u30a4\u30b3\u30f3\u30c1\u30c3\u30d7\u304c\u5fdc\u7b54\u3057\u307e\u3057\u305f\u3002\u300c\u30c4\u30fc\u30eb\u300d\u30e1\u30cb\u30e5\u30fc\u306e\u300c\u30de\u30a4\u30b3\u30f3\u30dc\u30fc\u30c9\u300d\u306e\u9078\u629e\u80a2\u304b\u3089\u3001\u6b63\u3057\u3044\u30de\u30a4\u30b3\u30f3\u30dc\u30fc\u30c9\u3092\u9078\u3093\u3067\u304f\u3060\u3055\u3044\u3002
#: debug/Compiler.java:41
!http\://code.google.com/p/arduino/issues/list=
#: debug/Compiler.java:79
No\ board\ selected;\ please\ choose\ a\ board\ from\ the\ Tools\ >\ Board\ menu.=\u30de\u30a4\u30b3\u30f3\u30dc\u30fc\u30c9\u304c\u9078\u3070\u308c\u3066\u3044\u307e\u305b\u3093\u3002\u300c\u30c4\u30fc\u30eb\u300d\u30e1\u30cb\u30e5\u30fc\u306e\u300c\u30de\u30a4\u30b3\u30f3\u30dc\u30fc\u30c9\u300d\u306e\u9078\u629e\u80a2\u304b\u3089\u3001\u30de\u30a4\u30b3\u30f3\u30dc\u30fc\u30c9\u3092\u9078\u3093\u3067\u304f\u3060\u3055\u3044\u3002
#: debug/Compiler.java:346
#, java-format
{0}\ returned\ {1}={0}\u304c{1}\u3092\u8fd4\u3057\u307e\u3057\u305f\u3002
#: debug/Compiler.java:350
Error\ compiling.=\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002
#: debug/Compiler.java:389
Please\ import\ the\ SPI\ library\ from\ the\ Sketch\ >\ Import\ Library\ menu.=\u300c\u30b9\u30b1\u30c3\u30c1\u300d\u30e1\u30cb\u30e5\u30fc\u306e\u300c\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u7528\u300d\u3067\u3001SPI\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u8aad\u307f\u8fbc\u3093\u3067\u304f\u3060\u3055\u3044\u3002
#: debug/Compiler.java:390
\nAs\ of\ Arduino\ 0019,\ the\ Ethernet\ library\ depends\ on\ the\ SPI\ library.\nYou\ appear\ to\ be\ using\ it\ or\ another\ library\ that\ depends\ on\ the\ SPI\ library.\n\n=\nArduino 0019\u4ee5\u964d\u3001Ethernet\u30e9\u30a4\u30d6\u30e9\u30ea\u306fSPI\u30e9\u30a4\u30d6\u30e9\u30ea\u306b\u4f9d\u5b58\u3057\u3066\u3044\u307e\u3059\u3002\nEthernet\u30e9\u30a4\u30d6\u30e9\u30ea\u307e\u305f\u306f\u305d\u306e\u4ed6\u306e\u3001SPI\u30e9\u30a4\u30d6\u30e9\u30ea\u306b\u4f9d\u5b58\u3059\u308b\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u3088\u3046\u3067\u3059\u306d\u3002\n\n
#: debug/Compiler.java:395
The\ 'BYTE'\ keyword\ is\ no\ longer\ supported.=\u300cBYTE\u300d\u30ad\u30fc\u30ef\u30fc\u30c9\u306f\u3001\u4f7f\u7528\u3067\u304d\u306a\u304f\u306a\u308a\u307e\u3057\u305f\u3002
#: debug/Compiler.java:396
\nAs\ of\ Arduino\ 1.0,\ the\ 'BYTE'\ keyword\ is\ no\ longer\ supported.\nPlease\ use\ Serial.write()\ instead.\n\n=\nArduino 1.0\u4ee5\u964d\u3001\u300cBYTE\u300d\u30ad\u30fc\u30ef\u30fc\u30c9\u306f\u4f7f\u7528\u3067\u304d\u306a\u304f\u306a\u308a\u307e\u3057\u305f\u3002\nSerial.write()\u3092\u4f7f\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n\n
#: debug/Compiler.java:401
The\ Server\ class\ has\ been\ renamed\ EthernetServer.=\u300cServer\u300d\u30af\u30e9\u30b9\u306f\u300cEthernetServer\u300d\u306b\u540d\u79f0\u5909\u66f4\u3055\u308c\u307e\u3057\u305f\u3002
#: debug/Compiler.java:402
\nAs\ of\ Arduino\ 1.0,\ the\ Server\ class\ in\ the\ Ethernet\ library\ has\ been\ renamed\ to\ EthernetServer.\n\n=\nArduino 1.0\u4ee5\u964d\u3001Ethernet\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u300cServer\u300d\u30af\u30e9\u30b9\u306f\u3001\u300cEthernetServer\u300d\u306b\u540d\u79f0\u5909\u66f4\u3055\u308c\u307e\u3057\u305f\u3002\n\n
#: debug/Compiler.java:407
The\ Client\ class\ has\ been\ renamed\ EthernetClient.=\u300cClient\u300d\u30af\u30e9\u30b9\u306f\u300cEthernetClient\u300d\u306b\u540d\u79f0\u5909\u66f4\u3055\u308c\u307e\u3057\u305f\u3002
#: debug/Compiler.java:408
\nAs\ of\ Arduino\ 1.0,\ the\ Client\ class\ in\ the\ Ethernet\ library\ has\ been\ renamed\ to\ EthernetClient.\n\n=\nArduino 1.0\u4ee5\u964d\u3001Ethernet\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u300cClient\u300d\u30af\u30e9\u30b9\u306f\u3001\u300cEthernetClient\u300d\u306b\u540d\u79f0\u5909\u66f4\u3055\u308c\u307e\u3057\u305f\u3002\n\n
#: debug/Compiler.java:413
The\ Udp\ class\ has\ been\ renamed\ EthernetUdp.=\u300cUdp\u300d\u30af\u30e9\u30b9\u306f\u300cEthernetUdp\u300d\u306b\u540d\u79f0\u5909\u66f4\u3055\u308c\u307e\u3057\u305f\u3002
#: debug/Compiler.java:414
\nAs\ of\ Arduino\ 1.0,\ the\ Udp\ class\ in\ the\ Ethernet\ library\ has\ been\ renamed\ to\ EthernetClient.\n\n=\nArduino 1.0\u4ee5\u964d\u3001Ethernet\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u300cUdp\u300d\u30af\u30e9\u30b9\u306f\u3001\u300cEthernetUdp\u300d\u306b\u540d\u79f0\u5909\u66f4\u3055\u308c\u307e\u3057\u305f\u3002\n\n
#: debug/Compiler.java:419
Wire.send()\ has\ been\ renamed\ Wire.write().=\u300cWire.send()\u300d\u306f\u3001\u300cWire.write()\u300d\u306b\u540d\u79f0\u5909\u66f4\u3055\u308c\u307e\u3057\u305f\u3002
#: debug/Compiler.java:420
\nAs\ of\ Arduino\ 1.0,\ the\ Wire.send()\ function\ was\ renamed\ to\ Wire.write()\ for\ consistency\ with\ other\ libraries.\n\n=\nArduino 1.0\u4ee5\u964d\u3001\u300cWire.send()\u300d\u95a2\u6570\u306f\u3001\u4ed6\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3068\u306e\u6574\u5408\u6027\u3092\u9ad8\u3081\u308b\u305f\u3081\u3001\u300cWire.write()\u300d\u306b\u540d\u79f0\u5909\u66f4\u3055\u308c\u307e\u3057\u305f\u3002\n
#: debug/Compiler.java:425
Wire.receive()\ has\ been\ renamed\ Wire.read().=\u300cWire.receive()\u300d\u306f\u3001\u300cWire.read()\u300d\u306b\u540d\u79f0\u5909\u66f4\u3055\u308c\u307e\u3057\u305f\u3002
#: debug/Compiler.java:426
\nAs\ of\ Arduino\ 1.0,\ the\ Wire.receive()\ function\ was\ renamed\ to\ Wire.read()\ for\ consistency\ with\ other\ libraries.\n\n=\nArduino 1.0\u4ee5\u964d\u3001\u300cWire.receive()\u300d\u95a2\u6570\u306f\u3001\u4ed6\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3068\u306e\u6574\u5408\u6027\u3092\u9ad8\u3081\u308b\u305f\u3081\u3001\u300cWire.read()\u300d\u306b\u540d\u79f0\u5909\u66f4\u3055\u308c\u307e\u3057\u305f\u3002\n
#: tools/format/src/AutoFormat.java:54 tools/AutoFormat.java:913
No\ changes\ necessary\ for\ Auto\ Format.=\u6574\u5f62\u306e\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002
#: tools/Archiver.java:48
Archive\ Sketch=\u30b9\u30b1\u30c3\u30c1\u3092\u30a2\u30fc\u30ab\u30a4\u30d6\u3059\u308b\u3002
#: tools/Archiver.java:59
yyMMdd=yyyyMMdd
#: tools/Archiver.java:74
Couldn't\ archive\ sketch=\u30b9\u30b1\u30c3\u30c1\u3092\u30a2\u30fc\u30ab\u30a4\u30d6\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002
#: tools/Archiver.java:75
Archiving\ the\ sketch\ has\ been\ canceled\ because\nthe\ sketch\ couldn't\ save\ properly.=\u30b9\u30b1\u30c3\u30c1\u3092\u4fdd\u5b58\u3067\u304d\u306a\u304b\u3063\u305f\u305f\u3081\u3001\u30b9\u30b1\u30c3\u30c1\u306e\u30a2\u30fc\u30ab\u30a4\u30d6\u306f\u53d6\u308a\u3084\u3081\u307e\u3057\u305f\u3002
#: tools/Archiver.java:109
Archive\ sketch\ as\:=\u30b9\u30b1\u30c3\u30c1\u3092\u30a2\u30fc\u30ab\u30a4\u30d6\u3059\u308b\u540d\u524d\uff1a
#: tools/Archiver.java:139
Archive\ sketch\ canceled.=\u30b9\u30b1\u30c3\u30c1\u306e\u30a2\u30fc\u30ab\u30a4\u30d6\u3092\u53d6\u308a\u3084\u3081\u307e\u3057\u305f
#: tools/AutoFormat.java:91
Auto\ Format=\u81ea\u52d5\u6574\u5f62
#: tools/AutoFormat.java:919
Auto\ Format\ Canceled\:\ Too\ many\ right\ parentheses.=\u300c)\u300d\u304c\u591a\u3059\u304e\u308b\u305f\u3081\u3001\u81ea\u52d5\u6574\u5f62\u3092\u53d6\u308a\u3084\u3081\u307e\u3057\u305f\u3002
#: tools/AutoFormat.java:922
Auto\ Format\ Canceled\:\ Too\ many\ left\ parentheses.=\u300c(\u300d\u304c\u591a\u3059\u304e\u308b\u305f\u3081\u3001\u81ea\u52d5\u6574\u5f62\u3092\u53d6\u308a\u3084\u3081\u307e\u3057\u305f\u3002
#: tools/AutoFormat.java:928
Auto\ Format\ Canceled\:\ Too\ many\ right\ curly\ braces.=\u300c}\u300d\u304c\u591a\u3059\u304e\u308b\u305f\u3081\u3001\u81ea\u52d5\u6574\u5f62\u3092\u53d6\u308a\u3084\u3081\u307e\u3057\u305f\u3002
#: tools/AutoFormat.java:931
Auto\ Format\ Canceled\:\ Too\ many\ left\ curly\ braces.=\u300c{\u300d\u304c\u591a\u3059\u304e\u308b\u305f\u3081\u3001\u81ea\u52d5\u6574\u5f62\u3092\u53d6\u308a\u3084\u3081\u307e\u3057\u305f\u3002
#: tools/AutoFormat.java:941
Auto\ Format\ finished.=\u81ea\u52d5\u6574\u5f62\u304c\u5b8c\u4e86\u3057\u307e\u3057\u305f\u3002
#: tools/FixEncoding.java:41 tools/FixEncoding.java:58
#: tools/FixEncoding.java:79
Fix\ Encoding\ &\ Reload=\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3092\u4fee\u6b63
#: tools/FixEncoding.java:57
Discard\ all\ changes\ and\ reload\ sketch?=\u672a\u4fdd\u5b58\u306e\u5909\u66f4\u3092\u7834\u68c4\u3057\u3066\u30b9\u30b1\u30c3\u30c1\u3092\u8aad\u307f\u8fbc\u307f\u76f4\u3057\u307e\u3059\u304b\uff1f
#: tools/FixEncoding.java:77
An\ error\ occurred\ while\ trying\ to\ fix\ the\ file\ encoding.\nDo\ not\ attempt\ to\ save\ this\ sketch\ as\ it\ may\ overwrite\nthe\ old\ version.\ Use\ Open\ to\ re-open\ the\ sketch\ and\ try\ again.\n=\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3092\u4fee\u6b63\u3057\u3088\u3046\u3068\u3057\u307e\u3057\u305f\u304c\u3001\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\n\u4eca\u3053\u3053\u3067\u4fdd\u5b58\u3059\u308b\u3068\u3001\u4fee\u6b63\u524d\u306e\u30b9\u30b1\u30c3\u30c1\u3092\u304a\u304b\u3057\u306a\u5185\u5bb9\u3067\u4e0a\u66f8\u304d\u3057\u3066\u3057\u307e\u3046\n\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002\u30b9\u30b1\u30c3\u30c1\u3092\u958b\u304d\u76f4\u3057\u3066\u3001\u3082\u3046\u4e00\u5ea6\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u306e\n\u4fee\u6b63\u3092\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002
#: Editor.java:374
No\ files\ were\ added\ to\ the\ sketch.=\u30b9\u30b1\u30c3\u30c1\u306b\u30d5\u30a1\u30a4\u30eb\u306f\u8ffd\u52a0\u3055\u308c\u307e\u305b\u3093\u3067\u3057\u305f\u3002
#: Editor.java:381
#, java-format
{0}\ files\ added\ to\ the\ sketch.=\u30b9\u30b1\u30c3\u30c1\u306b\u30d5\u30a1\u30a4\u30eb\u3092{0}\u500b\u8ffd\u52a0\u3057\u307e\u3057\u305f\u3002
#: Editor.java:492
File=\u30d5\u30a1\u30a4\u30eb
#: Editor.java:511
Sketchbook=\u30b9\u30b1\u30c3\u30c1\u30d6\u30c3\u30af
#: Editor.java:517
Examples=\u30b9\u30b1\u30c3\u30c1\u4f8b
#: Editor.java:522 Editor.java:1962
Close=\u9589\u3058\u308b
#: Editor.java:538
Save\ As...=\u540d\u524d\u3092\u4ed8\u3051\u3066\u4fdd\u5b58
#: Editor.java:564
Page\ Setup=\u30d7\u30ea\u30f3\u30bf\u306e\u8a2d\u5b9a...
#: Editor.java:572
Print=\u5370\u5237...
#: Editor.java:608
Sketch=\u30b9\u30b1\u30c3\u30c1
#: Editor.java:610
Verify\ /\ Compile=\u691c\u8a3c\u30fb\u30b3\u30f3\u30d1\u30a4\u30eb
#: Editor.java:637
Import\ Library...=\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u7528
#: Editor.java:642
Show\ Sketch\ Folder=\u30b9\u30b1\u30c3\u30c1\u306e\u30d5\u30a9\u30eb\u30c0\u3092\u8868\u793a
#: Editor.java:651
Add\ File...=\u30d5\u30a1\u30a4\u30eb\u3092\u8ffd\u52a0...
#: Editor.java:664
Tools=\u30c4\u30fc\u30eb
#: Editor.java:690
Board=\u30de\u30a4\u30b3\u30f3\u30dc\u30fc\u30c9
#: Editor.java:698
Serial\ Port=\u30b7\u30ea\u30a2\u30eb\u30dd\u30fc\u30c8
#: Editor.java:703
Programmer=\u66f8\u8fbc\u88c5\u7f6e
#: Editor.java:707
Burn\ Bootloader=\u30d6\u30fc\u30c8\u30ed\u30fc\u30c0\u3092\u66f8\u304d\u8fbc\u3080
#: Editor.java:931
serialMenu\ is\ null=serialMenu\u304c\u30ab\u30e9\u3067\u3059
#: Editor.java:935 Editor.java:942
name\ is\ null=\u540d\u524d\u304c\u30ab\u30e9\u3067\u3059
#: Editor.java:994
error\ retrieving\ port\ list=\u30dd\u30fc\u30c8\u540d\u306e\u4e00\u89a7\u3092\u53d6\u5f97\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002
#: Editor.java:1010
Help=\u30d8\u30eb\u30d7
#: Editor.java:1049
Getting\ Started=\u521d\u5fc3\u8005\u5411\u3051\u30ac\u30a4\u30c9
#: Editor.java:1057
Environment=\u3053\u306e\u30bd\u30d5\u30c8\u306e\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066
#: Editor.java:1065
Troubleshooting=\u30c8\u30e9\u30d6\u30eb\u30b7\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0
#: Editor.java:1073
Reference=\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9
#: Editor.java:1081 Editor.java:2713
Find\ in\ Reference=\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u3067\u691c\u7d22
#: Editor.java:1091
Frequently\ Asked\ Questions=\u3088\u304f\u3042\u308b\u8cea\u554f
#: Editor.java:1099
Visit\ Arduino.cc=Arduino.cc\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u3092\u958b\u304f
#: Editor.java:1102
!http\://arduino.cc/=
#: Editor.java:1110
About\ Arduino=Arduino\u306b\u3064\u3044\u3066...
#: Editor.java:1124
Edit=\u7de8\u96c6
#: Editor.java:1127 Editor.java:1326
Undo=\u5143\u306b\u623b\u3059
#: Editor.java:1131 Editor.java:1361
Redo=\u3084\u308a\u76f4\u3057
#: Editor.java:1139 Editor.java:2637
Cut=\u5207\u308a\u53d6\u308a
#: Editor.java:1147 Editor.java:2645
Copy=\u30b3\u30d4\u30fc
#: Editor.java:1155 Editor.java:2653
Copy\ for\ Forum=\u30d5\u30a9\u30fc\u30e9\u30e0\u6295\u7a3f\u5f62\u5f0f\u3067\u30b3\u30d4\u30fc\u3059\u308b
#: Editor.java:1167 Editor.java:2661
Copy\ as\ HTML=HTML\u5f62\u5f0f\u3067\u30b3\u30d4\u30fc\u3059\u308b
#: Editor.java:1179 Editor.java:2669
Paste=\u8cbc\u308a\u4ed8\u3051
#: Editor.java:1188 Editor.java:2677
Select\ All=\u5168\u3066\u9078\u629e
#: Editor.java:1198 Editor.java:2687
Comment/Uncomment=\u30b3\u30e1\u30f3\u30c8\u5316\u30fb\u5fa9\u5e30
#: Editor.java:1206 Editor.java:2695
Increase\ Indent=\u30a4\u30f3\u30c7\u30f3\u30c8\u3092\u5897\u3084\u3059
#: Editor.java:1214 Editor.java:2703
Decrease\ Indent=\u30a4\u30f3\u30c7\u30f3\u30c8\u3092\u6e1b\u3089\u3059
#: Editor.java:1224
Find...=\u691c\u7d22...
#: Editor.java:1239
Find\ Next=\u6b21\u3092\u691c\u7d22
#: Editor.java:1801
First\ select\ a\ word\ to\ find\ in\ the\ reference.=\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u3067\u691c\u7d22\u3057\u305f\u3044\u8a00\u8449\u3092\u9078\u3093\u3060\u72b6\u614b\u306b\u3057\u3066\u304b\u3089\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002
#: Editor.java:1808
#, java-format
No\ reference\ available\ for\ "{0}"=\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u30de\u30cb\u30e5\u30a2\u30eb\u306b\u300c{0}\u300d\u306f\u3042\u308a\u307e\u305b\u3093\u3002
#: Editor.java:1811
#, java-format
!{0}.html=
#: Editor.java:1849 Editor.java:1866
Done\ compiling.=\u30b3\u30f3\u30d1\u30a4\u30eb\u7d42\u4e86\u3002
#: Editor.java:1958
#, java-format
Save\ changes\ to\ "{0}"?\ \ =\u5909\u66f4\u5185\u5bb9\u3092\u300c{0}\u300d\u306b\u66f8\u304d\u8fbc\u307f\u307e\u3059\u304b\uff1f
#: Editor.java:1991
<html>\ <head>\ <style\ type\="text/css">b\ {\ font\:\ 13pt\ "Lucida\ Grande"\ }p\ {\ font\:\ 11pt\ "Lucida\ Grande";\ margin-top\:\ 8px\ }</style>\ </head><b>Do\ you\ want\ to\ save\ changes\ to\ this\ sketch<BR>\ before\ closing?</b><p>If\ you\ don't\ save,\ your\ changes\ will\ be\ lost.=<html> <head> <style type\="text/css">b { font\: 13pt "Lucida Grande" }p { font\: 11pt "Lucida Grande"; margin-top\: 8px }</style> </head><b>\u9589\u3058\u308b\u524d\u306b\u30b9\u30b1\u30c3\u30c1\u306b\u52a0\u3048\u305f\u5909\u66f4\u5185\u5bb9\u3092\u4fdd\u5b58\u3057\u307e\u3059\u304b\uff1f</b><p>\u4fdd\u5b58\u3057\u306a\u3044\u3068\u3001\u5909\u66f4\u5185\u5bb9\u306f\u5931\u308f\u308c\u307e\u3059\u3002
#: Editor.java:2002
Don't\ Save=\u4fdd\u5b58\u3057\u306a\u3044
#: Editor.java:2074
Bad\ file\ selected=\u9593\u9055\u3063\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u304d\u307e\u3057\u305f\u3002
#: Editor.java:2075
Processing\ can\ only\ open\ its\ own\ sketches\nand\ other\ files\ ending\ in\ .ino\ or\ .pde=\u3053\u306eIDE\u306f\u3001\u30d5\u30a1\u30a4\u30eb\u540d\u304c\u62e1\u5f35\u5b50.ino\u307e\u305f\u306f.pde\u3067\n\u7d42\u308f\u308b\u30d5\u30a1\u30a4\u30eb\u3060\u3051\u3092\u958b\u304f\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002
#: Editor.java:2085
#, java-format
The\ file\ "{0}"\ needs\ to\ be\ inside\na\ sketch\ folder\ named\ "{1}".\nCreate\ this\ folder,\ move\ the\ file,\ and\ continue?=\u300c{0}\u300d\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u306f\u3001\u300c{1}\u300d\u3068\u3044\u3046\u540d\u524d\u306e\u30d5\u30a9\u30eb\u30c0\u306e\u4e2d\u306b\u3042\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u81ea\u52d5\u7684\u306b\u3053\u306e\u30d5\u30a9\u30eb\u30c0\u3092\u4f5c\u3063\u3066\u3001\u30d5\u30a1\u30a4\u30eb\u3092\u4e2d\u306b\u5165\u308c\u307e\u3059\u304b\uff1f
#: Editor.java:2094
Moving=\u79fb\u52d5\u4e2d
#: Editor.java:2107
#, java-format
A\ folder\ named\ "{0}"\ already\ exists.\ Can't\ open\ sketch.=\u300c{0}\u300d\u3068\u3044\u3046\u540d\u524d\u306e\u30d5\u30a9\u30eb\u30c0\u306f\u3059\u3067\u306b\u5b58\u5728\u3057\u307e\u3059\u3002\u30b9\u30b1\u30c3\u30c1\u3092\u958b\u3051\u307e\u305b\u3093\u3002
#: Editor.java:2117
Could\ not\ create\ the\ sketch\ folder.=\u30b9\u30b1\u30c3\u30c1\u30d5\u30a9\u30eb\u30c0\u3092\u4f5c\u6210\u3067\u304d\u307e\u305b\u3093\u3002
#: Editor.java:2126
Could\ not\ copy\ to\ a\ proper\ location.=\u30b3\u30d4\u30fc\u3059\u308b\u3079\u304d\u30d5\u30a9\u30eb\u30c0\u306b\u30d5\u30a1\u30a4\u30eb\u3092\u30b3\u30d4\u30fc\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002
#: Editor.java:2144
Could\ not\ create\ the\ sketch.=\u30b9\u30b1\u30c3\u30c1\u3092\u4f5c\u6210\u3067\u304d\u307e\u305b\u3093\u3002
#: Editor.java:2151
#, java-format
!{0}\ |\ Arduino\ {1}=
#: Editor.java:2208 Editor.java:2246
Saving...=\u4fdd\u5b58\u4e2d\u3067\u3059...
#: Editor.java:2213 Editor.java:2249
Done\ Saving.=\u4fdd\u5b58\u3057\u307e\u3057\u305f\u3002
#: Editor.java:2255
Save\ Canceled.=\u4fdd\u5b58\u3092\u4e2d\u6b62\u3057\u307e\u3057\u305f\u3002
#: Editor.java:2281
#, java-format
Serial\ port\ {0}\ not\ found.\nRetry\ the\ upload\ with\ another\ serial\ port?=\u30b7\u30ea\u30a2\u30eb\u30dd\u30fc\u30c8\u300c{0}\u300d\u304c\u5b58\u5728\u3057\u307e\u305b\u3093\u3002\n\u30b7\u30ea\u30a2\u30eb\u30dd\u30fc\u30c8\u3092\u5909\u66f4\u3057\u3066\u3001\u3082\u3046\u4e00\u5ea6\u66f8\u304d\u8fbc\u307f\u307e\u3059\u304b\uff1f
#: Editor.java:2316
Uploading\ to\ I/O\ Board...=\u30de\u30a4\u30b3\u30f3\u30dc\u30fc\u30c9\u306b\u66f8\u304d\u8fbc\u3093\u3067\u3044\u307e\u3059\u2026
#: Editor.java:2333 Editor.java:2369
Done\ uploading.=\u30de\u30a4\u30b3\u30f3\u30dc\u30fc\u30c9\u3078\u306e\u66f8\u304d\u8fbc\u307f\u304c\u5b8c\u4e86\u3057\u307e\u3057\u305f\u3002
#: Editor.java:2341 Editor.java:2377
Upload\ canceled.=\u66f8\u304d\u8fbc\u307f\u3092\u53d6\u308a\u3084\u3081\u307e\u3057\u305f\u3002
#: Editor.java:2405
Save\ changes\ before\ export?=\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3092\u884c\u3046\u524d\u306b\u4fdd\u5b58\u3057\u307e\u3059\u304b\uff1f
#: Editor.java:2420
Export\ canceled,\ changes\ must\ first\ be\ saved.=\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3092\u53d6\u308a\u3084\u3081\u307e\u3057\u305f\u3002\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3092\u884c\u3046\u524d\u306b\u4fdd\u5b58\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002
#: Editor.java:2442
Burning\ bootloader\ to\ I/O\ Board\ (this\ may\ take\ a\ minute)...=\u30de\u30a4\u30b3\u30f3\u30dc\u30fc\u30c9\u306b\u30d6\u30fc\u30c8\u30ed\u30fc\u30c0\u3092\u66f8\u304d\u8fbc\u3093\u3067\u3044\u307e\u3059\u2026
#: Editor.java:2448
Done\ burning\ bootloader.=\u30d6\u30fc\u30c8\u30ed\u30fc\u30c0\u306e\u66f8\u304d\u8fbc\u307f\u304c\u5b8c\u4e86\u3057\u307e\u3057\u305f\u3002
#: Editor.java:2450 Editor.java:2454 Editor.java:2458
Error\ while\ burning\ bootloader.=\u30d6\u30fc\u30c8\u30ed\u30fc\u30c0\u3092\u66f8\u304d\u8fbc\u3082\u3046\u3068\u3057\u307e\u3057\u305f\u304c\u3001\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002
#: Editor.java:2485
Printing...=\u5370\u5237\u3057\u3066\u3044\u307e\u3059...
#: Editor.java:2502
Done\ printing.=\u5370\u5237\u304c\u5b8c\u4e86\u3057\u307e\u3057\u305f\u3002
#: Editor.java:2505
Error\ while\ printing.=\u5370\u5237\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002
#: Editor.java:2509
Printing\ canceled.=\u5370\u5237\u3092\u53d6\u308a\u3084\u3081\u307e\u3057\u305f\u3002
#: Editor.java:2557
#, java-format
Bad\ error\ line\:\ {0}=\u30a8\u30e9\u30fc\u306e\u884c\u756a\u53f7\u300c{0}\u300d\u306f\u7bc4\u56f2\u5916\u3067\u3059\u3002
#: Editor.java:2626
Open\ URL=URL\u3092\u958b\u304f
#: Platform.java:167
No\ launcher\ available=\u5916\u90e8\u30d7\u30ed\u30b0\u30e9\u30e0\u8d77\u52d5\u30c4\u30fc\u30eb\u304c\u6709\u308a\u307e\u305b\u3093\u3002
#: Platform.java:168
Unspecified\ platform,\ no\ launcher\ available.\nTo\ enable\ opening\ URLs\ or\ folders,\ add\ a\ \n"launcher\=/path/to/app"\ line\ to\ preferences.txt=\u5916\u90e8\u30d7\u30ed\u30b0\u30e9\u30e0\u8d77\u52d5\u30c4\u30fc\u30eb\u304c\u6709\u308a\u307e\u305b\u3093\u3002URL\u3084\u30d5\u30a9\u30eb\u30c0\u3092\u81ea\u52d5\u7684\u306b\u958b\u304f\u6a5f\u80fd\u3092\u6709\u52b9\u306b\u3059\u308b\u306b\u306f\u3001preferences.txt\u306b"launcher\=/path/to/app"\u306e\u8a2d\u5b9a\u884c\u3092\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002

View File

@ -26,6 +26,7 @@ package processing.app;
//import processing.core.*; //import processing.core.*;
import processing.app.debug.MessageConsumer; import processing.app.debug.MessageConsumer;
import static processing.app.I18n._;
import gnu.io.*; import gnu.io.*;
@ -141,16 +142,32 @@ public class Serial implements SerialPortEventListener {
} }
} }
} catch (PortInUseException e) { } catch (PortInUseException e) {
throw new SerialException("Serial port '" + iname + "' already in use. Try quiting any programs that may be using it."); throw new SerialException(
I18n.format(
_("Serial port ''{0}'' already in use. Try quiting any programs that may be using it."),
iname
)
);
} catch (Exception e) { } catch (Exception e) {
throw new SerialException("Error opening serial port '" + iname + "'.", e); throw new SerialException(
I18n.format(
_("Error opening serial port ''{0}''."),
iname
),
e
);
// //errorMessage("<init>", e); // //errorMessage("<init>", e);
// //exception = e; // //exception = e;
// //e.printStackTrace(); // //e.printStackTrace();
} }
if (port == null) { if (port == null) {
throw new SerialNotFoundException("Serial port '" + iname + "' not found. Did you select the right one from the Tools > Serial Port menu?"); throw new SerialNotFoundException(
I18n.format(
_("Serial port ''{0}'' not found. Did you select the right one from the Tools > Serial Port menu?"),
iname
)
);
} }
} }
@ -402,9 +419,14 @@ public class Serial implements SerialPortEventListener {
int length = found - bufferIndex + 1; int length = found - bufferIndex + 1;
if (length > outgoing.length) { if (length > outgoing.length) {
System.err.println("readBytesUntil() byte buffer is" + System.err.println(
" too small for the " + length + I18n.format(
" bytes up to and including char " + interesting); _("readBytesUntil() byte buffer is too small for the {0}" +
" bytes up to and including char {1}"),
length,
interesting
)
);
return -1; return -1;
} }
//byte outgoing[] = new byte[length]; //byte outgoing[] = new byte[length];
@ -542,7 +564,7 @@ public class Serial implements SerialPortEventListener {
* I think of something slightly more intelligent to do. * I think of something slightly more intelligent to do.
*/ */
static public void errorMessage(String where, Throwable e) { static public void errorMessage(String where, Throwable e) {
System.err.println("Error inside Serial." + where + "()"); System.err.println(I18n.format(_("Error inside Serial.{0}()"), where));
e.printStackTrace(); e.printStackTrace();
} }
} }

View File

@ -20,6 +20,7 @@ package processing.app;
import processing.app.debug.MessageConsumer; import processing.app.debug.MessageConsumer;
import processing.core.*; import processing.core.*;
import static processing.app.I18n._;
import java.awt.*; import java.awt.*;
import java.awt.event.*; import java.awt.event.*;
@ -89,7 +90,7 @@ public class SerialMonitor extends JFrame implements MessageConsumer {
textField.setText(""); textField.setText("");
}}); }});
sendButton = new JButton("Send"); sendButton = new JButton(_("Send"));
sendButton.addActionListener(new ActionListener() { sendButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
send(textField.getText()); send(textField.getText());
@ -106,9 +107,9 @@ public class SerialMonitor extends JFrame implements MessageConsumer {
pane.setLayout(new BoxLayout(pane, BoxLayout.X_AXIS)); pane.setLayout(new BoxLayout(pane, BoxLayout.X_AXIS));
pane.setBorder(new EmptyBorder(4, 4, 4, 4)); pane.setBorder(new EmptyBorder(4, 4, 4, 4));
autoscrollBox = new JCheckBox("Autoscroll", true); autoscrollBox = new JCheckBox(_("Autoscroll"), true);
lineEndings = new JComboBox(new String[] { "No line ending", "Newline", "Carriage return", "Both NL & CR" }); lineEndings = new JComboBox(new String[] { _("No line ending"), _("Newline"), _("Carriage return"), _("Both NL & CR") });
lineEndings.addActionListener(new ActionListener() { lineEndings.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent event) { public void actionPerformed(ActionEvent event) {
Preferences.setInteger("serial.line_ending", lineEndings.getSelectedIndex()); Preferences.setInteger("serial.line_ending", lineEndings.getSelectedIndex());
@ -126,10 +127,10 @@ public class SerialMonitor extends JFrame implements MessageConsumer {
serialRates = new JComboBox(); serialRates = new JComboBox();
for (int i = 0; i < serialRateStrings.length; i++) for (int i = 0; i < serialRateStrings.length; i++)
serialRates.addItem(serialRateStrings[i] + " baud"); serialRates.addItem(serialRateStrings[i] + _(" baud"));
serialRate = Preferences.getInteger("serial.debug_rate"); serialRate = Preferences.getInteger("serial.debug_rate");
serialRates.setSelectedItem(serialRate + " baud"); serialRates.setSelectedItem(serialRate + _(" baud"));
serialRates.addActionListener(new ActionListener() { serialRates.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent event) { public void actionPerformed(ActionEvent event) {
String wholeString = (String) serialRates.getSelectedItem(); String wholeString = (String) serialRates.getSelectedItem();

View File

@ -30,6 +30,7 @@ import processing.app.debug.Sizer;
import processing.app.debug.Uploader; import processing.app.debug.Uploader;
import processing.app.preproc.*; import processing.app.preproc.*;
import processing.core.*; import processing.core.*;
import static processing.app.I18n._;
import java.awt.*; import java.awt.*;
import java.awt.event.*; import java.awt.event.*;
@ -274,15 +275,15 @@ public class Sketch {
// if read-only, give an error // if read-only, give an error
if (isReadOnly()) { if (isReadOnly()) {
// if the files are read-only, need to first do a "save as". // if the files are read-only, need to first do a "save as".
Base.showMessage("Sketch is Read-Only", Base.showMessage(_("Sketch is Read-Only"),
"Some files are marked \"read-only\", so you'll\n" + _("Some files are marked \"read-only\", so you'll\n" +
"need to re-save the sketch in another location,\n" + "need to re-save the sketch in another location,\n" +
"and try again."); "and try again."));
return; return;
} }
renamingCode = false; renamingCode = false;
editor.status.edit("Name for new file:", ""); editor.status.edit(_("Name for new file:"), "");
} }
@ -294,19 +295,19 @@ public class Sketch {
ensureExistence(); ensureExistence();
if (currentIndex == 0 && editor.untitled) { if (currentIndex == 0 && editor.untitled) {
Base.showMessage("Sketch is Untitled", Base.showMessage(_("Sketch is Untitled"),
"How about saving the sketch first \n" + _("How about saving the sketch first \n" +
"before trying to rename it?"); "before trying to rename it?"));
return; return;
} }
// if read-only, give an error // if read-only, give an error
if (isReadOnly()) { if (isReadOnly()) {
// if the files are read-only, need to first do a "save as". // if the files are read-only, need to first do a "save as".
Base.showMessage("Sketch is Read-Only", Base.showMessage(_("Sketch is Read-Only"),
"Some files are marked \"read-only\", so you'll\n" + _("Some files are marked \"read-only\", so you'll\n" +
"need to re-save the sketch in another location,\n" + "need to re-save the sketch in another location,\n" +
"and try again."); "and try again."));
return; return;
} }
@ -355,16 +356,17 @@ public class Sketch {
int dot = newName.indexOf('.'); int dot = newName.indexOf('.');
if (dot == 0) { if (dot == 0) {
Base.showWarning("Problem with rename", Base.showWarning(_("Problem with rename"),
"The name cannot start with a period.", null); _("The name cannot start with a period."), null);
return; return;
} }
String newExtension = newName.substring(dot+1).toLowerCase(); String newExtension = newName.substring(dot+1).toLowerCase();
if (!validExtension(newExtension)) { if (!validExtension(newExtension)) {
Base.showWarning("Problem with rename", Base.showWarning(_("Problem with rename"),
"\"." + newExtension + "\"" + I18n.format(
"is not a valid extension.", null); _("\".{0}\" is not a valid extension."), newExtension
), null);
return; return;
} }
@ -372,10 +374,10 @@ public class Sketch {
if (!isDefaultExtension(newExtension)) { if (!isDefaultExtension(newExtension)) {
if (renamingCode) { // If creating a new tab, don't show this error if (renamingCode) { // If creating a new tab, don't show this error
if (current == code[0]) { // If this is the main tab, disallow if (current == code[0]) { // If this is the main tab, disallow
Base.showWarning("Problem with rename", Base.showWarning(_("Problem with rename"),
"The main file can't use an extension.\n" + _("The main file can't use an extension.\n" +
"(It may be time for your to graduate to a\n" + "(It may be time for your to graduate to a\n" +
"\"real\" programming environment)", null); "\"real\" programming environment)"), null);
return; return;
} }
} }
@ -395,9 +397,12 @@ public class Sketch {
// might cause problems: http://dev.processing.org/bugs/show_bug.cgi?id=543 // might cause problems: http://dev.processing.org/bugs/show_bug.cgi?id=543
for (SketchCode c : code) { for (SketchCode c : code) {
if (newName.equalsIgnoreCase(c.getFileName())) { if (newName.equalsIgnoreCase(c.getFileName())) {
Base.showMessage("Nope", Base.showMessage(_("Nope"),
"A file named \"" + c.getFileName() + "\" already exists\n" + I18n.format(
"in \"" + folder.getAbsolutePath() + "\""); _("A file named \"{0}\" already exists in \"{1}\""),
c.getFileName(),
folder.getAbsolutePath()
));
return; return;
} }
} }
@ -406,8 +411,8 @@ public class Sketch {
// because the sketch is concatenated into a file with that name as part // because the sketch is concatenated into a file with that name as part
// of the build process. // of the build process.
if (newName.equals(getName() + ".cpp")) { if (newName.equals(getName() + ".cpp")) {
Base.showMessage("Nope", Base.showMessage(_("Nope"),
"You can't have a .cpp file with the same name as the sketch."); _("You can't have a .cpp file with the same name as the sketch."));
return; return;
} }
@ -415,9 +420,12 @@ public class Sketch {
for (int i = 1; i < codeCount; i++) { for (int i = 1; i < codeCount; i++) {
if (sanitaryName.equalsIgnoreCase(code[i].getPrettyName()) && if (sanitaryName.equalsIgnoreCase(code[i].getPrettyName()) &&
code[i].getExtension().equalsIgnoreCase("cpp")) { code[i].getExtension().equalsIgnoreCase("cpp")) {
Base.showMessage("Nope", Base.showMessage(_("Nope"),
"You can't rename the sketch to \"" + sanitaryName + "\"\n" + I18n.format(
"because the sketch already has a .cpp file with that name."); _("You can't rename the sketch to \"{0}\"\n" +
"because the sketch already has a .cpp file with that name."),
sanitaryName
));
return; return;
} }
} }
@ -448,9 +456,12 @@ public class Sketch {
String folderName = newName.substring(0, newName.indexOf('.')); String folderName = newName.substring(0, newName.indexOf('.'));
File newFolder = new File(folder.getParentFile(), folderName); File newFolder = new File(folder.getParentFile(), folderName);
if (newFolder.exists()) { if (newFolder.exists()) {
Base.showWarning("Cannot Rename", Base.showWarning(_("Cannot Rename"),
"Sorry, a sketch (or folder) named " + I18n.format(
"\"" + newName + "\" already exists.", null); _("Sorry, a sketch (or folder) named " +
"\"{0}\" already exists."),
newName
), null);
return; return;
} }
@ -465,15 +476,18 @@ public class Sketch {
// save this new SketchCode // save this new SketchCode
current.save(); current.save();
} catch (Exception e) { } catch (Exception e) {
Base.showWarning("Error", "Could not rename the sketch. (0)", e); Base.showWarning(_("Error"), _("Could not rename the sketch. (0)"), e);
return; return;
} }
} }
if (!current.renameTo(newFile, newExtension)) { if (!current.renameTo(newFile, newExtension)) {
Base.showWarning("Error", Base.showWarning(_("Error"),
"Could not rename \"" + current.getFileName() + I18n.format(
"\" to \"" + newFile.getName() + "\"", null); _("Could not rename \"{0}\" to \"{1}\""),
current.getFileName(),
newFile.getName()
), null);
return; return;
} }
@ -483,14 +497,14 @@ public class Sketch {
code[i].save(); code[i].save();
} }
} catch (Exception e) { } catch (Exception e) {
Base.showWarning("Error", "Could not rename the sketch. (1)", e); Base.showWarning(_("Error"), _("Could not rename the sketch. (1)"), e);
return; return;
} }
// now rename the sketch folder and re-open // now rename the sketch folder and re-open
boolean success = folder.renameTo(newFolder); boolean success = folder.renameTo(newFolder);
if (!success) { if (!success) {
Base.showWarning("Error", "Could not rename the sketch. (2)", null); Base.showWarning(_("Error"), _("Could not rename the sketch. (2)"), null);
return; return;
} }
// if successful, set base properties for the sketch // if successful, set base properties for the sketch
@ -513,9 +527,12 @@ public class Sketch {
} else { // else if something besides code[0] } else { // else if something besides code[0]
if (!current.renameTo(newFile, newExtension)) { if (!current.renameTo(newFile, newExtension)) {
Base.showWarning("Error", Base.showWarning(_("Error"),
"Could not rename \"" + current.getFileName() + I18n.format(
"\" to \"" + newFile.getName() + "\"", null); _("Could not rename \"{0}\" to \"{1}\""),
current.getFileName(),
newFile.getName()
), null);
return; return;
} }
} }
@ -524,12 +541,15 @@ public class Sketch {
try { try {
if (!newFile.createNewFile()) { if (!newFile.createNewFile()) {
// Already checking for IOException, so make our own. // Already checking for IOException, so make our own.
throw new IOException("createNewFile() returned false"); throw new IOException(_("createNewFile() returned false"));
} }
} catch (IOException e) { } catch (IOException e) {
Base.showWarning("Error", Base.showWarning(_("Error"),
"Could not create the file \"" + newFile + "\"\n" + I18n.format(
"in \"" + folder.getAbsolutePath() + "\"", e); "Could not create the file \"{0}\" in \"{1}\"",
newFile,
folder.getAbsolutePath()
), e);
return; return;
} }
SketchCode newCode = new SketchCode(newFile, newExtension); SketchCode newCode = new SketchCode(newFile, newExtension);
@ -558,21 +578,21 @@ public class Sketch {
// if read-only, give an error // if read-only, give an error
if (isReadOnly()) { if (isReadOnly()) {
// if the files are read-only, need to first do a "save as". // if the files are read-only, need to first do a "save as".
Base.showMessage("Sketch is Read-Only", Base.showMessage(_("Sketch is Read-Only"),
"Some files are marked \"read-only\", so you'll\n" + _("Some files are marked \"read-only\", so you'll\n" +
"need to re-save the sketch in another location,\n" + "need to re-save the sketch in another location,\n" +
"and try again."); "and try again."));
return; return;
} }
// confirm deletion with user, yes/no // confirm deletion with user, yes/no
Object[] options = { "OK", "Cancel" }; Object[] options = { _("OK"), _("Cancel") };
String prompt = (currentIndex == 0) ? String prompt = (currentIndex == 0) ?
"Are you sure you want to delete this sketch?" : _("Are you sure you want to delete this sketch?") :
"Are you sure you want to delete \"" + current.getPrettyName() + "\"?"; I18n.format(_("Are you sure you want to delete \"{0}\"?"), current.getPrettyName());
int result = JOptionPane.showOptionDialog(editor, int result = JOptionPane.showOptionDialog(editor,
prompt, prompt,
"Delete", _("Delete"),
JOptionPane.YES_NO_OPTION, JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE, JOptionPane.QUESTION_MESSAGE,
null, null,
@ -597,9 +617,8 @@ public class Sketch {
} else { } else {
// delete the file // delete the file
if (!current.deleteFile()) { if (!current.deleteFile()) {
Base.showMessage("Couldn't do it", Base.showMessage(_("Couldn't do it"),
"Could not delete \"" + I18n.format(_("Could not delete \"{0}\"."), current.getFileName()));
current.getFileName() + "\".");
return; return;
} }
@ -629,7 +648,7 @@ public class Sketch {
return; return;
} }
} }
System.err.println("removeCode: internal error.. could not find code"); System.err.println(_("removeCode: internal error.. could not find code"));
} }
@ -702,9 +721,9 @@ public class Sketch {
if (isReadOnly()) { if (isReadOnly()) {
// if the files are read-only, need to first do a "save as". // if the files are read-only, need to first do a "save as".
Base.showMessage("Sketch is read-only", Base.showMessage(_("Sketch is read-only"),
"Some files are marked \"read-only\", so you'll\n" + _("Some files are marked \"read-only\", so you'll\n" +
"need to re-save this sketch to another location."); "need to re-save this sketch to another location."));
// if the user cancels, give up on the save() // if the user cancels, give up on the save()
if (!saveAs()) return false; if (!saveAs()) return false;
} else { } else {
@ -719,16 +738,16 @@ public class Sketch {
if (pdeFiles != null && pdeFiles.length > 0) { if (pdeFiles != null && pdeFiles.length > 0) {
if (Preferences.get("editor.update_extension") == null) { if (Preferences.get("editor.update_extension") == null) {
Object[] options = { "OK", "Cancel" }; Object[] options = { _("OK"), _("Cancel") };
int result = JOptionPane.showOptionDialog(editor, int result = JOptionPane.showOptionDialog(editor,
"In Arduino 1.0, the default file extension has changed\n" + _("In Arduino 1.0, the default file extension has changed\n" +
"from .pde to .ino. New sketches (including those created\n" + "from .pde to .ino. New sketches (including those created\n" +
"by \"Save-As\" will use the new extension. The extension\n" + "by \"Save-As\" will use the new extension. The extension\n" +
"of existing sketches will be updated on save, but you can\n" + "of existing sketches will be updated on save, but you can\n" +
"disable this in the Preferences dialog.\n" + "disable this in the Preferences dialog.\n" +
"\n" + "\n" +
"Save sketch and update its extension?", "Save sketch and update its extension?"),
".pde -> .ino", _(".pde -> .ino"),
JOptionPane.OK_CANCEL_OPTION, JOptionPane.OK_CANCEL_OPTION,
JOptionPane.QUESTION_MESSAGE, JOptionPane.QUESTION_MESSAGE,
null, null,
@ -807,7 +826,7 @@ public class Sketch {
// get new name for folder // get new name for folder
FileDialog fd = new FileDialog(editor, FileDialog fd = new FileDialog(editor,
"Save sketch folder as...", _("Save sketch folder as..."),
FileDialog.SAVE); FileDialog.SAVE);
if (isReadOnly() || isUntitled()) { if (isReadOnly() || isUntitled()) {
// default to the sketchbook folder // default to the sketchbook folder
@ -841,9 +860,12 @@ public class Sketch {
for (int i = 1; i < codeCount; i++) { for (int i = 1; i < codeCount; i++) {
if (newName.equalsIgnoreCase(code[i].getPrettyName()) && if (newName.equalsIgnoreCase(code[i].getPrettyName()) &&
code[i].getExtension().equalsIgnoreCase("cpp")) { code[i].getExtension().equalsIgnoreCase("cpp")) {
Base.showMessage("Nope", Base.showMessage(_("Nope"),
"You can't save the sketch as \"" + newName + "\"\n" + I18n.format(
"because the sketch already has a .cpp file with that name."); _("You can't save the sketch as \"{0}\"\n" +
"because the sketch already has a .cpp file with that name."),
newName
));
return false; return false;
} }
} }
@ -861,9 +883,9 @@ public class Sketch {
String oldPath = folder.getCanonicalPath() + File.separator; String oldPath = folder.getCanonicalPath() + File.separator;
if (newPath.indexOf(oldPath) == 0) { if (newPath.indexOf(oldPath) == 0) {
Base.showWarning("How very Borges of you", Base.showWarning(_("How very Borges of you"),
"You cannot save the sketch into a folder\n" + _("You cannot save the sketch into a folder\n" +
"inside itself. This would go on forever.", null); "inside itself. This would go on forever."), null);
return false; return false;
} }
} catch (IOException e) { } } catch (IOException e) { }
@ -945,16 +967,16 @@ public class Sketch {
// if read-only, give an error // if read-only, give an error
if (isReadOnly()) { if (isReadOnly()) {
// if the files are read-only, need to first do a "save as". // if the files are read-only, need to first do a "save as".
Base.showMessage("Sketch is Read-Only", Base.showMessage(_("Sketch is Read-Only"),
"Some files are marked \"read-only\", so you'll\n" + _("Some files are marked \"read-only\", so you'll\n" +
"need to re-save the sketch in another location,\n" + "need to re-save the sketch in another location,\n" +
"and try again."); "and try again."));
return; return;
} }
// get a dialog, select a file to add to the sketch // get a dialog, select a file to add to the sketch
String prompt = String prompt =
"Select an image or other data file to copy to your sketch"; _("Select an image or other data file to copy to your sketch");
//FileDialog fd = new FileDialog(new Frame(), prompt, FileDialog.LOAD); //FileDialog fd = new FileDialog(new Frame(), prompt, FileDialog.LOAD);
FileDialog fd = new FileDialog(editor, prompt, FileDialog.LOAD); FileDialog fd = new FileDialog(editor, prompt, FileDialog.LOAD);
fd.setVisible(true); fd.setVisible(true);
@ -971,7 +993,7 @@ public class Sketch {
boolean result = addFile(sourceFile); boolean result = addFile(sourceFile);
if (result) { if (result) {
editor.statusNotice("One file added to the sketch."); editor.statusNotice(_("One file added to the sketch."));
} }
} }
@ -1021,11 +1043,11 @@ public class Sketch {
// check whether this file already exists // check whether this file already exists
if (destFile.exists()) { if (destFile.exists()) {
Object[] options = { "OK", "Cancel" }; Object[] options = { _("OK"), _("Cancel") };
String prompt = "Replace the existing version of " + filename + "?"; String prompt = I18n.format(_("Replace the existing version of {0}?"), filename);
int result = JOptionPane.showOptionDialog(editor, int result = JOptionPane.showOptionDialog(editor,
prompt, prompt,
"Replace", _("Replace"),
JOptionPane.YES_NO_OPTION, JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE, JOptionPane.QUESTION_MESSAGE,
null, null,
@ -1044,19 +1066,19 @@ public class Sketch {
if (replacement) { if (replacement) {
boolean muchSuccess = destFile.delete(); boolean muchSuccess = destFile.delete();
if (!muchSuccess) { if (!muchSuccess) {
Base.showWarning("Error adding file", Base.showWarning(_("Error adding file"),
"Could not delete the existing '" + I18n.format(_("Could not delete the existing ''{0}'' file."), filename),
filename + "' file.", null); null);
return false; return false;
} }
} }
// make sure they aren't the same file // make sure they aren't the same file
if ((codeExtension == null) && sourceFile.equals(destFile)) { if ((codeExtension == null) && sourceFile.equals(destFile)) {
Base.showWarning("You can't fool me", Base.showWarning(_("You can't fool me"),
"This file has already been copied to the\n" + _("This file has already been copied to the\n" +
"location from which where you're trying to add it.\n" + "location from which where you're trying to add it.\n" +
"I ain't not doin nuthin'.", null); "I ain't not doin nuthin'."), null);
return false; return false;
} }
@ -1067,8 +1089,9 @@ public class Sketch {
Base.copyFile(sourceFile, destFile); Base.copyFile(sourceFile, destFile);
} catch (IOException e) { } catch (IOException e) {
Base.showWarning("Error adding file", Base.showWarning(_("Error adding file"),
"Could not add '" + filename + "' to the sketch.", e); I18n.format(_("Could not add ''{0}'' to the sketch."), filename),
e);
return false; return false;
} }
} }
@ -1333,7 +1356,7 @@ public class Sketch {
codeFolderPackages); codeFolderPackages);
} catch (FileNotFoundException fnfe) { } catch (FileNotFoundException fnfe) {
fnfe.printStackTrace(); fnfe.printStackTrace();
String msg = "Build folder disappeared or could not be written"; String msg = _("Build folder disappeared or could not be written");
throw new RunnerException(msg); throw new RunnerException(msg);
} }
@ -1348,7 +1371,7 @@ public class Sketch {
String className = preprocessor.write(); String className = preprocessor.write();
if (className == null) { if (className == null) {
throw new RunnerException("Could not find main class"); throw new RunnerException(_("Could not find main class"));
// this situation might be perfectly fine, // this situation might be perfectly fine,
// (i.e. if the file is empty) // (i.e. if the file is empty)
//System.out.println("No class found in " + code[i].name); //System.out.println("No class found in " + code[i].name);
@ -1364,7 +1387,7 @@ public class Sketch {
} catch (FileNotFoundException fnfe) { } catch (FileNotFoundException fnfe) {
fnfe.printStackTrace(); fnfe.printStackTrace();
String msg = "Build folder disappeared or could not be written"; String msg = _("Build folder disappeared or could not be written");
throw new RunnerException(msg); throw new RunnerException(msg);
} catch (RunnerException pe) { } catch (RunnerException pe) {
// RunnerExceptions are caught here and re-thrown, so that they don't // RunnerExceptions are caught here and re-thrown, so that they don't
@ -1373,7 +1396,7 @@ public class Sketch {
} catch (Exception ex) { } catch (Exception ex) {
// TODO better method for handling this? // TODO better method for handling this?
System.err.println("Uncaught exception type:" + ex.getClass()); System.err.println(I18n.format(_("Uncaught exception type: {0}"), ex.getClass()));
ex.printStackTrace(); ex.printStackTrace();
throw new RunnerException(ex.toString()); throw new RunnerException(ex.toString());
} }
@ -1405,8 +1428,7 @@ public class Sketch {
Base.saveFile(sc.getProgram(), new File(buildPath, filename)); Base.saveFile(sc.getProgram(), new File(buildPath, filename));
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
throw new RunnerException("Problem moving " + filename + throw new RunnerException(I18n.format(_("Problem moving {0} to the build folder"), filename));
" to the build folder");
} }
// sc.setPreprocName(filename); // sc.setPreprocName(filename);
@ -1606,7 +1628,7 @@ public class Sketch {
appletFolder.mkdirs(); appletFolder.mkdirs();
// build the sketch // build the sketch
editor.status.progressNotice("Compiling sketch..."); editor.status.progressNotice(_("Compiling sketch..."));
String foundName = build(appletFolder.getPath(), false); String foundName = build(appletFolder.getPath(), false);
// (already reported) error during export, exit this function // (already reported) error during export, exit this function
if (foundName == null) return false; if (foundName == null) return false;
@ -1620,7 +1642,7 @@ public class Sketch {
// return false; // return false;
// } // }
editor.status.progressNotice("Uploading..."); editor.status.progressNotice(_("Uploading..."));
upload(appletFolder.getPath(), foundName, usingProgrammer); upload(appletFolder.getPath(), foundName, usingProgrammer);
editor.status.progressUpdate(100); editor.status.progressUpdate(100);
return true; return true;
@ -1641,15 +1663,19 @@ public class Sketch {
Sizer sizer = new Sizer(buildPath, suggestedClassName); Sizer sizer = new Sizer(buildPath, suggestedClassName);
try { try {
size = sizer.computeSize(); size = sizer.computeSize();
System.out.println("Binary sketch size: " + size + " bytes (of a " + System.out.println(
maxsize + " byte maximum)"); I18n.format(
_("Binary sketch size: {0} bytes (of a {1} byte maximum)"),
size, maxsize
)
);
} catch (RunnerException e) { } catch (RunnerException e) {
System.err.println("Couldn't determine program size: " + e.getMessage()); System.err.println(I18n.format(_("Couldn't determine program size: {0}"), e.getMessage()));
} }
if (size > maxsize) if (size > maxsize)
throw new RunnerException( throw new RunnerException(
"Sketch too big; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing it."); _("Sketch too big; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing it."));
} }
@ -1709,8 +1735,8 @@ public class Sketch {
} }
} }
if (!endOfRainbow) { if (!endOfRainbow) {
throw new RuntimeException("Missing the */ from the end of a " + throw new RuntimeException(_("Missing the */ from the end of a " +
"/* comment */"); "/* comment */"));
} }
} else { // any old character, move along } else { // any old character, move along
index++; index++;
@ -1751,10 +1777,10 @@ public class Sketch {
protected void ensureExistence() { protected void ensureExistence() {
if (folder.exists()) return; if (folder.exists()) return;
Base.showWarning("Sketch Disappeared", Base.showWarning(_("Sketch Disappeared"),
"The sketch folder has disappeared.\n " + _("The sketch folder has disappeared.\n " +
"Will attempt to re-save in the same location,\n" + "Will attempt to re-save in the same location,\n" +
"but anything besides the code will be lost.", null); "but anything besides the code will be lost."), null);
try { try {
folder.mkdirs(); folder.mkdirs();
modified = true; modified = true;
@ -1765,11 +1791,11 @@ public class Sketch {
calcModified(); calcModified();
} catch (Exception e) { } catch (Exception e) {
Base.showWarning("Could not re-save sketch", Base.showWarning(_("Could not re-save sketch"),
"Could not properly re-save the sketch. " + _("Could not properly re-save the sketch. " +
"You may be in trouble at this point,\n" + "You may be in trouble at this point,\n" +
"and it might be time to copy and paste " + "and it might be time to copy and paste " +
"your code to another text editor.", e); "your code to another text editor."), e);
} }
} }
@ -2015,9 +2041,9 @@ public class Sketch {
if (!newName.equals(origName)) { if (!newName.equals(origName)) {
String msg = String msg =
"The sketch name had to be modified. Sketch names can only consist\n" + _("The sketch name had to be modified. Sketch names can only consist\n" +
"of ASCII characters and numbers (but cannot start with a number).\n" + "of ASCII characters and numbers (but cannot start with a number).\n" +
"They should also be less less than 64 characters long."; "They should also be less less than 64 characters long.");
System.out.println(msg); System.out.println(msg);
} }
return newName; return newName;

View File

@ -28,6 +28,7 @@ import java.io.*;
import javax.swing.text.Document; import javax.swing.text.Document;
import javax.swing.undo.*; import javax.swing.undo.*;
import static processing.app.I18n._;
/** /**
@ -78,7 +79,8 @@ public class SketchCode {
try { try {
load(); load();
} catch (IOException e) { } catch (IOException e) {
System.err.println("Error while loading code " + file.getName()); System.err.println(
I18n.format(_("Error while loading code {0}"), file.getName()));
} }
} }
@ -251,11 +253,16 @@ public class SketchCode {
program = Base.loadFile(file); program = Base.loadFile(file);
if (program.indexOf('\uFFFD') != -1) { if (program.indexOf('\uFFFD') != -1) {
System.err.println(file.getName() + " contains unrecognized characters."); System.err.println(
System.err.println("If this code was created with an older version of Processing,"); I18n.format(
System.err.println("you may need to use Tools -> Fix Encoding & Reload to update"); _("\"{0}\" contains unrecognized characters." +
System.err.println("the sketch to use UTF-8 encoding. If not, you may need to"); "If this code was created with an older version of Processing," +
System.err.println("delete the bad characters to get rid of this warning."); "you may need to use Tools -> Fix Encoding & Reload to update" +
"the sketch to use UTF-8 encoding. If not, you may need to" +
"delete the bad characters to get rid of this warning."),
file.getName()
)
);
System.err.println(); System.err.println();
} }

View File

@ -29,6 +29,7 @@ import java.util.*;
import processing.app.syntax.*; import processing.app.syntax.*;
import processing.core.*; import processing.core.*;
import static processing.app.I18n._;
/** /**
@ -48,8 +49,8 @@ public class Theme {
try { try {
load(Base.getLibStream("theme/theme.txt")); load(Base.getLibStream("theme/theme.txt"));
} catch (Exception te) { } catch (Exception te) {
Base.showError(null, "Could not read color theme settings.\n" + Base.showError(null, _("Could not read color theme settings.\n" +
"You'll need to reinstall Processing.", te); "You'll need to reinstall Processing."), te);
} }
// check for platform-specific properties in the defaults // check for platform-specific properties in the defaults
@ -200,4 +201,4 @@ public class Theme {
return new SyntaxStyle(color, italic, bold, underlined); return new SyntaxStyle(color, italic, bold, underlined);
} }
} }

View File

@ -32,6 +32,7 @@ import java.util.Random;
import javax.swing.JOptionPane; import javax.swing.JOptionPane;
import processing.core.PApplet; import processing.core.PApplet;
import static processing.app.I18n._;
/** /**
@ -49,7 +50,7 @@ import processing.core.PApplet;
*/ */
public class UpdateCheck implements Runnable { public class UpdateCheck implements Runnable {
Base base; Base base;
String downloadURL = "http://www.arduino.cc/latest.txt"; String downloadURL = _("http://www.arduino.cc/latest.txt");
static final long ONE_DAY = 24 * 60 * 60 * 1000; static final long ONE_DAY = 24 * 60 * 60 * 1000;
@ -99,22 +100,22 @@ public class UpdateCheck implements Runnable {
Preferences.set("update.last", String.valueOf(now)); Preferences.set("update.last", String.valueOf(now));
String prompt = String prompt =
"A new version of Arduino is available,\n" + _("A new version of Arduino is available,\n" +
"would you like to visit the Arduino download page?"; "would you like to visit the Arduino download page?");
if (base.activeEditor != null) { if (base.activeEditor != null) {
if (latest > Base.REVISION) { if (latest > Base.REVISION) {
Object[] options = { "Yes", "No" }; Object[] options = { _("Yes"), _("No") };
int result = JOptionPane.showOptionDialog(base.activeEditor, int result = JOptionPane.showOptionDialog(base.activeEditor,
prompt, prompt,
"Update", _("Update"),
JOptionPane.YES_NO_OPTION, JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE, JOptionPane.QUESTION_MESSAGE,
null, null,
options, options,
options[0]); options[0]);
if (result == JOptionPane.YES_OPTION) { if (result == JOptionPane.YES_OPTION) {
Base.openURL("http://www.arduino.cc/en/Main/Software"); Base.openURL(_("http://www.arduino.cc/en/Main/Software"));
} }
} }
} }

View File

@ -28,6 +28,8 @@ import processing.app.Preferences;
import processing.app.Sketch; import processing.app.Sketch;
import processing.app.SketchCode; import processing.app.SketchCode;
import processing.core.*; import processing.core.*;
import processing.app.I18n;
import static processing.app.I18n._;
import java.io.*; import java.io.*;
import java.util.*; import java.util.*;
@ -36,9 +38,9 @@ import java.util.zip.*;
public class Compiler implements MessageConsumer { public class Compiler implements MessageConsumer {
static final String BUGS_URL = static final String BUGS_URL =
"http://code.google.com/p/arduino/issues/list"; _("http://code.google.com/p/arduino/issues/list");
static final String SUPER_BADNESS = static final String SUPER_BADNESS =
"Compiler error, please submit this code to " + BUGS_URL; I18n.format(_("Compiler error, please submit this code to {0}"), BUGS_URL);
Sketch sketch; Sketch sketch;
String buildPath; String buildPath;
@ -74,7 +76,7 @@ public class Compiler implements MessageConsumer {
Map<String, String> boardPreferences = Base.getBoardPreferences(); Map<String, String> boardPreferences = Base.getBoardPreferences();
String core = boardPreferences.get("build.core"); String core = boardPreferences.get("build.core");
if (core == null) { if (core == null) {
RunnerException re = new RunnerException("No board selected; please choose a board from the Tools > Board menu."); RunnerException re = new RunnerException(_("No board selected; please choose a board from the Tools > Board menu."));
re.hideStackTrace(); re.hideStackTrace();
throw re; throw re;
} }
@ -346,11 +348,12 @@ public class Compiler implements MessageConsumer {
if (result > 1) { if (result > 1) {
// a failure in the tool (e.g. unable to locate a sub-executable) // a failure in the tool (e.g. unable to locate a sub-executable)
System.err.println(command[0] + " returned " + result); System.err.println(
I18n.format(_("{0} returned {1}"), command[0], result));
} }
if (result != 0) { if (result != 0) {
RunnerException re = new RunnerException("Error compiling."); RunnerException re = new RunnerException(_("Error compiling."));
re.hideStackTrace(); re.hideStackTrace();
throw re; throw re;
} }
@ -389,45 +392,45 @@ public class Compiler implements MessageConsumer {
String error = pieces[3], msg = ""; String error = pieces[3], msg = "";
if (pieces[3].trim().equals("SPI.h: No such file or directory")) { if (pieces[3].trim().equals("SPI.h: No such file or directory")) {
error = "Please import the SPI library from the Sketch > Import Library menu."; error = _("Please import the SPI library from the Sketch > Import Library menu.");
msg = "\nAs of Arduino 0019, the Ethernet library depends on the SPI library." + msg = _("\nAs of Arduino 0019, the Ethernet library depends on the SPI library." +
"\nYou appear to be using it or another library that depends on the SPI library.\n\n"; "\nYou appear to be using it or another library that depends on the SPI library.\n\n");
} }
if (pieces[3].trim().equals("'BYTE' was not declared in this scope")) { if (pieces[3].trim().equals("'BYTE' was not declared in this scope")) {
error = "The 'BYTE' keyword is no longer supported."; error = _("The 'BYTE' keyword is no longer supported.");
msg = "\nAs of Arduino 1.0, the 'BYTE' keyword is no longer supported." + msg = _("\nAs of Arduino 1.0, the 'BYTE' keyword is no longer supported." +
"\nPlease use Serial.write() instead.\n\n"; "\nPlease use Serial.write() instead.\n\n");
} }
if (pieces[3].trim().equals("no matching function for call to 'Server::Server(int)'")) { if (pieces[3].trim().equals("no matching function for call to 'Server::Server(int)'")) {
error = "The Server class has been renamed EthernetServer."; error = _("The Server class has been renamed EthernetServer.");
msg = "\nAs of Arduino 1.0, the Server class in the Ethernet library " + msg = _("\nAs of Arduino 1.0, the Server class in the Ethernet library " +
"has been renamed to EthernetServer.\n\n"; "has been renamed to EthernetServer.\n\n");
} }
if (pieces[3].trim().equals("no matching function for call to 'Client::Client(byte [4], int)'")) { if (pieces[3].trim().equals("no matching function for call to 'Client::Client(byte [4], int)'")) {
error = "The Client class has been renamed EthernetClient."; error = _("The Client class has been renamed EthernetClient.");
msg = "\nAs of Arduino 1.0, the Client class in the Ethernet library " + msg = _("\nAs of Arduino 1.0, the Client class in the Ethernet library " +
"has been renamed to EthernetClient.\n\n"; "has been renamed to EthernetClient.\n\n");
} }
if (pieces[3].trim().equals("'Udp' was not declared in this scope")) { if (pieces[3].trim().equals("'Udp' was not declared in this scope")) {
error = "The Udp class has been renamed EthernetUdp."; error = _("The Udp class has been renamed EthernetUdp.");
msg = "\nAs of Arduino 1.0, the Udp class in the Ethernet library " + msg = _("\nAs of Arduino 1.0, the Udp class in the Ethernet library " +
"has been renamed to EthernetClient.\n\n"; "has been renamed to EthernetClient.\n\n");
} }
if (pieces[3].trim().equals("'class TwoWire' has no member named 'send'")) { if (pieces[3].trim().equals("'class TwoWire' has no member named 'send'")) {
error = "Wire.send() has been renamed Wire.write()."; error = _("Wire.send() has been renamed Wire.write().");
msg = "\nAs of Arduino 1.0, the Wire.send() function was renamed " + msg = _("\nAs of Arduino 1.0, the Wire.send() function was renamed " +
"to Wire.write() for consistency with other libraries.\n\n"; "to Wire.write() for consistency with other libraries.\n\n");
} }
if (pieces[3].trim().equals("'class TwoWire' has no member named 'receive'")) { if (pieces[3].trim().equals("'class TwoWire' has no member named 'receive'")) {
error = "Wire.receive() has been renamed Wire.read()."; error = _("Wire.receive() has been renamed Wire.read().");
msg = "\nAs of Arduino 1.0, the Wire.receive() function was renamed " + msg = _("\nAs of Arduino 1.0, the Wire.receive() function was renamed " +
"to Wire.read() for consistency with other libraries.\n\n"; "to Wire.read() for consistency with other libraries.\n\n");
} }
RunnerException e = sketch.placeException(error, pieces[1], PApplet.parseInt(pieces[2]) - 1); RunnerException e = sketch.placeException(error, pieces[1], PApplet.parseInt(pieces[2]) - 1);

View File

@ -31,6 +31,8 @@ import processing.app.Preferences;
import processing.app.Serial; import processing.app.Serial;
import processing.app.SerialException; import processing.app.SerialException;
import processing.app.SerialNotFoundException; import processing.app.SerialNotFoundException;
import processing.app.I18n;
import static processing.app.I18n._;
import java.io.*; import java.io.*;
import java.util.*; import java.util.*;
@ -47,9 +49,9 @@ import gnu.io.*;
public abstract class Uploader implements MessageConsumer { public abstract class Uploader implements MessageConsumer {
static final String BUGS_URL = static final String BUGS_URL =
"https://developer.berlios.de/bugs/?group_id=3590"; _("https://developer.berlios.de/bugs/?group_id=3590");
static final String SUPER_BADNESS = static final String SUPER_BADNESS =
"Compiler error, please submit this code to " + BUGS_URL; I18n.format(_("Compiler error, please submit this code to {0}"), BUGS_URL);
RunnerException exception; RunnerException exception;
//PdePreferences preferences; //PdePreferences preferences;
@ -194,21 +196,21 @@ public abstract class Uploader implements MessageConsumer {
} }
if(notFoundError) { if(notFoundError) {
//System.out.println("throwing something"); //System.out.println("throwing something");
exception = new RunnerException("the selected serial port "+s+" does not exist or your board is not connected"); exception = new RunnerException(I18n.format(_("the selected serial port {0} does not exist or your board is not connected"), s));
return; return;
} }
if (s.indexOf("Device is not responding") != -1 ) { if (s.indexOf("Device is not responding") != -1 ) {
exception = new RunnerException("Device is not responding, check the right serial port is selected or RESET the board right before exporting"); exception = new RunnerException(_("Device is not responding, check the right serial port is selected or RESET the board right before exporting"));
return; return;
} }
if (s.indexOf("Programmer is not responding") != -1 || if (s.indexOf("Programmer is not responding") != -1 ||
s.indexOf("programmer is not responding") != -1 || s.indexOf("programmer is not responding") != -1 ||
s.indexOf("protocol error") != -1) { s.indexOf("protocol error") != -1) {
exception = new RunnerException("Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions."); exception = new RunnerException(_("Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions."));
return; return;
} }
if (s.indexOf("Expected signature") != -1) { if (s.indexOf("Expected signature") != -1) {
exception = new RunnerException("Wrong microcontroller found. Did you select the right board from the Tools > Board menu?"); exception = new RunnerException(_("Wrong microcontroller found. Did you select the right board from the Tools > Board menu?"));
return; return;
} }
} }

View File

@ -0,0 +1,78 @@
#!/usr/bin/python
#vim:set fileencoding=utf-8 sw=2
#
# Remove unused catalog text lines from ".po" file.
#
def unquote(s):
s = s.strip()
if s[0] != '"' or s[-1] != '"':
raise RuntimeError
return s[1:-1]
def read_po(fp):
st = 1
comment = key = value = rkey = rvalue = ''
for line in fp:
if line[0] == '#' or line.strip() == '':
if st == 2:
yield (comment, key, value, rkey, rvalue)
st = 1
comment = key = value = rkey = rvalue = ''
comment += line
elif line[0] == '"':
if st == 1:
key += unquote(line)
rkey += line
else:
value += unquote(line)
rvalue += line
elif line.startswith('msgid '):
st = 1
key = unquote(line[5:])
rkey = line
elif line.startswith('msgstr '):
st = 2
value = unquote(line[6:])
rvalue = line
else:
raise RuntimeError
if st == 2:
yield (comment, key, value, rkey, rvalue)
def main():
import sys
# Read the current text catalog.
d = {}
firstcomment = ''
it = read_po(file(sys.argv[1]))
try:
(comment, key, value, rkey, rvalue) = it.next()
d[key] = rvalue
firstcomment = comment # Preserve the first comment block
except StopIteration:
pass
for (comment, key, value, rkey, rvalue) in it:
d[key] = rvalue
# Read the new text catalog template and output.
# The translated values come from the current text catalog read above.
out = file(sys.argv[1], 'w')
out.write(firstcomment)
it = read_po(sys.stdin)
try:
(comment, key, value, rkey, rvalue) = it.next()
out.write(rkey)
out.write(d.get(key, rvalue))
except StopIteration:
pass
for (comment, key, value, rkey, rvalue) in it:
out.write(comment)
out.write(rkey)
out.write(d.get(key, rvalue))
if __name__ == '__main__':
main()

View File

@ -0,0 +1,31 @@
#!/bin/sh
#
# Extract the text catalog from the source code,
# and merge with the already translated texts.
#
# Please be aware that this OVERWRITES the existing *.po and *.properties files.
# You may want to commit to your repository before running this script.
#
# by Shigeru KANEMOTO at SWITCHSCIENCE.
# on 2011-10-15
catalog="/tmp/$$.po"
files="/tmp/$$.files"
trap "rm -f '$catalog' '$files'" 0 1 2 15
# Generate the new text catalog without the already translated texts.
# The 'merge existing' option for xgetext does not work propery for our purpose.
find . -name '*.java' -print > "$files"
xgettext -L Java --from-code=utf-8 -k_ --output="$catalog" --files-from="$files"
# Then, merge with already translated texts.
for target in *.po; do
echo "Updating $target..."
cat "$catalog" | python i18n_update.py "$target"
msgcat -p "$target" > $(basename "$target" .po).properties
# msgcat may complain about "CHARSET" if you didn't replace "CHARSET" with
# your correct charset.
done

View File

@ -24,6 +24,7 @@
package processing.app.tools; package processing.app.tools;
import processing.app.*; import processing.app.*;
import static processing.app.I18n._;
import java.awt.FileDialog; import java.awt.FileDialog;
import java.io.*; import java.io.*;
@ -44,7 +45,7 @@ public class Archiver implements Tool {
public String getMenuTitle() { public String getMenuTitle() {
return "Archive Sketch"; return _("Archive Sketch");
} }
@ -55,7 +56,7 @@ public class Archiver implements Tool {
numberFormat.setGroupingUsed(false); // no commas numberFormat.setGroupingUsed(false); // no commas
numberFormat.setMinimumIntegerDigits(digits); numberFormat.setMinimumIntegerDigits(digits);
dateFormat = new SimpleDateFormat("yyMMdd"); dateFormat = new SimpleDateFormat(_("yyMMdd"));
} }
@ -70,9 +71,8 @@ public class Archiver implements Tool {
e.printStackTrace(); e.printStackTrace();
} }
if (!success) { if (!success) {
Base.showWarning("Couldn't archive sketch", Base.showWarning(_("Couldn't archive sketch"),
"Archiving the sketch has been canceled because\n" + _("Archiving the sketch has been canceled because\nthe sketch couldn't save properly."), null);
"the sketch couldn't save properly.", null);
return; return;
} }
@ -106,7 +106,7 @@ public class Archiver implements Tool {
// open up a prompt for where to save this fella // open up a prompt for where to save this fella
FileDialog fd = FileDialog fd =
new FileDialog(editor, "Archive sketch as:", FileDialog.SAVE); new FileDialog(editor, _("Archive sketch as:"), FileDialog.SAVE);
fd.setDirectory(parent.getAbsolutePath()); fd.setDirectory(parent.getAbsolutePath());
fd.setFile(newbie.getName()); fd.setFile(newbie.getName());
fd.setVisible(true); fd.setVisible(true);
@ -136,7 +136,7 @@ public class Archiver implements Tool {
e.printStackTrace(); e.printStackTrace();
} }
} else { } else {
editor.statusNotice("Archive sketch canceled."); editor.statusNotice(_("Archive sketch canceled."));
} }
} }

View File

@ -26,6 +26,7 @@ package processing.app.tools;
import processing.app.*; import processing.app.*;
import processing.core.PApplet; import processing.core.PApplet;
import static processing.app.I18n._;
import java.io.*; import java.io.*;
@ -87,7 +88,7 @@ public class AutoFormat implements Tool {
public String getMenuTitle() { public String getMenuTitle() {
return "Auto Format"; return _("Auto Format");
} }
public void comment() throws IOException { public void comment() throws IOException {
@ -909,18 +910,26 @@ public class AutoFormat implements Tool {
String formattedText = strOut.toString(); String formattedText = strOut.toString();
if (formattedText.equals(originalText)) { if (formattedText.equals(originalText)) {
editor.statusNotice("No changes necessary for Auto Format."); editor.statusNotice(_("No changes necessary for Auto Format."));
} else if (paren != 0) { } else if (paren != 0) {
// warn user if there are too many parens in either direction // warn user if there are too many parens in either direction
editor.statusError("Auto Format Canceled: Too many " + if (paren < 0) {
((paren < 0) ? "right" : "left") + editor.statusError(
" parentheses."); _("Auto Format Canceled: Too many right parentheses."));
} else {
editor.statusError(
_("Auto Format Canceled: Too many left parentheses."));
}
} else if (c_level != 0) { // check braces only if parens are ok } else if (c_level != 0) { // check braces only if parens are ok
editor.statusError("Auto Format Canceled: Too many " + if (c_level < 0) {
((c_level < 0) ? "right" : "left") + editor.statusError(
" curly braces."); _("Auto Format Canceled: Too many right curly braces."));
} else {
editor.statusError(
_("Auto Format Canceled: Too many left curly braces."));
}
} else { } else {
// replace with new bootiful text // replace with new bootiful text
@ -929,7 +938,7 @@ public class AutoFormat implements Tool {
editor.setSelection(selectionEnd, selectionEnd); editor.setSelection(selectionEnd, selectionEnd);
editor.getSketch().setModified(true); editor.getSketch().setModified(true);
// mark as finished // mark as finished
editor.statusNotice("Auto Format finished."); editor.statusNotice(_("Auto Format finished."));
} }
} catch (Exception e) { } catch (Exception e) {

View File

@ -30,6 +30,7 @@ import java.io.IOException;
import javax.swing.JOptionPane; import javax.swing.JOptionPane;
import processing.app.*; import processing.app.*;
import static processing.app.I18n._;
public class FixEncoding implements Tool { public class FixEncoding implements Tool {
@ -37,7 +38,7 @@ public class FixEncoding implements Tool {
public String getMenuTitle() { public String getMenuTitle() {
return "Fix Encoding & Reload"; return _("Fix Encoding & Reload");
} }
@ -53,8 +54,8 @@ public class FixEncoding implements Tool {
if (sketch.isModified()) { if (sketch.isModified()) {
int result = int result =
JOptionPane.showConfirmDialog(editor, JOptionPane.showConfirmDialog(editor,
"Discard all changes and reload sketch?", _("Discard all changes and reload sketch?"),
"Fix Encoding & Reload", _("Fix Encoding & Reload"),
JOptionPane.YES_NO_OPTION, JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE); JOptionPane.QUESTION_MESSAGE);
@ -73,11 +74,9 @@ public class FixEncoding implements Tool {
} catch (IOException e) { } catch (IOException e) {
String msg = String msg =
"An error occurred while trying to fix the file encoding.\n" + _("An error occurred while trying to fix the file encoding.\nDo not attempt to save this sketch as it may overwrite\nthe old version. Use Open to re-open the sketch and try again.\n") +
"Do not attempt to save this sketch as it may overwrite\n" +
"the old version. Use Open to re-open the sketch and try again.\n" +
e.getMessage(); e.getMessage();
Base.showWarning("Fix Encoding & Reload", msg, e); Base.showWarning(_("Fix Encoding & Reload"), msg, e);
} }
} }
@ -96,4 +95,4 @@ public class FixEncoding implements Tool {
reader.close(); reader.close();
return buffer.toString(); return buffer.toString();
} }
} }

View File

@ -24,6 +24,7 @@ package processing.app.tools;
import processing.app.*; import processing.app.*;
import processing.core.*; import processing.core.*;
import static processing.app.I18n._;
import java.io.*; import java.io.*;
@ -50,7 +51,7 @@ public class AutoFormat {
String formattedText = null; //strOut.toString(); String formattedText = null; //strOut.toString();
if (formattedText.equals(originalText)) { if (formattedText.equals(originalText)) {
editor.message("No changes necessary for Auto Format."); editor.message(_("No changes necessary for Auto Format."));
} else { } else {
// replace with new bootiful text // replace with new bootiful text