added new file or tab handling translations

This commit is contained in:
Darius Morawiec
2014-08-03 15:42:44 +02:00
parent 8372abc8de
commit 63afa4e810
3 changed files with 38 additions and 8 deletions

View File

@@ -290,7 +290,7 @@ public class Sketch {
renamingCode = false;
// editor.status.edit("Name for new file:", "");
promptForTabName("Name for new file:", "");
promptForTabName(Language.text("editor.tab.rename.description")+":", "");
}
@@ -327,11 +327,11 @@ public class Sketch {
// TODO maybe just popup a text area?
renamingCode = true;
String prompt = (currentIndex == 0) ?
"New name for sketch:" : "New name for file:";
Language.text("editor.sketch.rename.description") : Language.text("editor.tab.rename.description");
String oldName = (current.isExtension(mode.getDefaultExtension())) ?
current.getPrettyName() : current.getFileName();
// editor.status.edit(prompt, oldName);
promptForTabName(prompt, oldName);
promptForTabName(prompt+":", oldName);
}
/**
@@ -405,7 +405,7 @@ public class Sketch {
int userReply = JOptionPane.showOptionDialog(editor, new Object[] {
prompt, field },
"New Name",
Language.text("editor.tab.new"),
JOptionPane.OK_CANCEL_OPTION,
JOptionPane.PLAIN_MESSAGE,
null, new Object[] {
@@ -635,11 +635,11 @@ public class Sketch {
// confirm deletion with user, yes/no
Object[] options = { "OK", "Cancel" };
String prompt = (currentIndex == 0) ?
"Are you sure you want to delete this sketch?" :
"Are you sure you want to delete \"" + current.getPrettyName() + "\"?";
Language.text("warn.delete.sketch") :
Language.interpolate("warn.delete.file", current.getPrettyName());
int result = JOptionPane.showOptionDialog(editor,
prompt,
"Delete",
Language.text("warn.delete"),
JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE,
null,

View File

@@ -227,6 +227,15 @@ editor.header.next_tab = Next Tab
editor.header.delete.warning.title = Yeah, no.
editor.header.delete.warning.text = You can't delete the last tab of the last open sketch.
# Tab
editor.tab.new = New Name
editor.tab.new.description = Name for new file
editor.tab.rename = New Name
editor.tab.rename.description = New name for file
# Sketch
editor.sketch.rename.description = New name for sketch
editor.status.autoformat.no_changes = No changes necessary for Auto Format.
editor.status.autoformat.finished = Auto Format finished.
editor.status.find_reference.select_word_first = First select a word to find in the reference.
@@ -251,3 +260,9 @@ contributions.progress.starting = Starting
contributions.progress.downloading = Downloading
contributions.download_error = An error occured while downloading the contribution.
contributions.unsupported_operating_system = Your operating system doesn't appear to be supported. You should visit the %s's library for more info.
# ---------------------------------------
# Warnings
warn.delete = Delete
warn.delete.sketch = Are you sure you want to delete this sketch?
warn.delete.file = Are you sure you want to delete "%s"?

View File

@@ -209,4 +209,19 @@ editor.header.delete = Löschen
editor.header.previous_tab = Nächster Tab
editor.header.next_tab = Vorheriger Tab
editor.header.delete.warning.title = Yeah, nein.
editor.header.delete.warning.text = Du kannst nicht den letzten Tab des letzten Sketches löschen.
editor.header.delete.warning.text = Du kannst nicht den letzten Tab des letzten Sketches löschen.
# Tab
editor.tab.new = Neuer Name
editor.tab.new.description = Name der neuen Datei
editor.tab.rename = Neuer Name
editor.tab.rename.description = Name der neuen Datei
# Sketch
editor.sketch.rename.description = Name des neuen Sketches
# ---------------------------------------
# Warnings
warn.delete = Löschen
warn.delete.sketch = Den Sketch endgültig löschen?
warn.delete.file = Die Datei "%s" entgültig löschen?