Commit 54659c21 authored by twanvl's avatar twanvl

...more localisation...

parent 0514e8dd
......@@ -3,18 +3,18 @@
############################################################## Menu items
menu
file: &File
new: &New... Ctrl+N
open: &Open... Ctrl+O
save: &Save Ctrl+S
save as: Save &As... F12
new set: &New... Ctrl+N
open set: &Open... Ctrl+O
save set: &Save Ctrl+S
save set as: Save &As... F12
export: &Export
print preview: Print Pre&view...
print: &Print... Ctrl+P
exit: E&xit Alt+F4
edit: &Edit
undo: &Undo %s Ctrl+Z
redo: &Redo %s Ctrl+Y
undo: &Undo%s Ctrl+Z
redo: &Redo%s Ctrl+Y
cut: Cu&t Ctrl+X
copy: &Copy Ctrl+C
paste: &Paste Ctrl+V
......@@ -38,14 +38,32 @@ menu
help: &Help
about: &About Magic Set Editor...
# symbol editor
new symbol: &New... Ctrl+N
open symbol: &Open... Ctrl+O
save symbol: &Save Ctrl+S
save symbol as: Save &As... F12
store symbol: S&tore Ctrl+Enter
close symbol editor:Close Alt+F4
duplicate: Duplicate Ctrl+D
tool: &Tool
select: &Select F5
rotate: &Rotate F6
points: &Points F7
basic shapes: &Basic Shapes F8
paint: P&aint F9
############################################################## Menu help texts
help:
file:
new: Create a new set
open: Open an existing set
save: Save the set
save as: Save the set with a new name
new set: Create a new set
open set: Open an existing set
save set: Save the set
save set as: Save the set with a new name
print preview: Shows cards as they will be printed
print: Print cards from this set
exit: Quits Magic Set Editor; prompts to save the set
......@@ -53,6 +71,10 @@ help:
edit:
undo: Undoes the last action
redo: Redoes the last action
cut: Move the selected text to the clipboard
copy: Place the selected text on the clipboard
paste: Inserts the text from the clipboard
preferences: Change the configuration of Magic Set Editor
format:
bold: Makes the selected text bold
......@@ -62,12 +84,40 @@ help:
new window: Creates another window to edit the same set
help:
# symbol editor
new symbol: Create a new symbol
open symbol: Open a symbol
save symbol: Save the symbol
save symbol as: Save the symbol under a diferent filename
store symbol: Stores the symbol in the set
close symbol editor:Closes the symbol editor
duplicate: Duplicates the selected shapes
tool:
select: Select and move shapes
rotate: Rotate and shear shapes
points: Edit control points for a shape in the symbol
basic shapes: Draw basic shapes, such as rectangles and circles
paint: Paint on the shape using a paintbrush
############################################################## Toolbar
tool:
cards tab: Cards
set info tab: Set info
new set: New set
open set: Open set
save set: Save set
cut: Cut
copy: Copy
paste: Paste
undo: Undo%s
redo: Redo%s
remove card: Remove selected card
rotated card: Rotate card
......@@ -75,6 +125,15 @@ tool:
italic: Italic
symbols: Symbols
reminder text: Reminder Text
# symbol editor
store symbol: Store symbol in set
select: Select (F5)
rotate: Rotate (F6)
points: Points (F7)
basic shapes: Basic Shapes (F8)
paint: Paint on Shape (F9)
############################################################## Labels in the GUI
label:
......@@ -141,15 +200,23 @@ button:
title:
magic set editor: Magic Set Editor
about: About Magic Set Editor
# dialogs
open set: Open Set
save set: Save Set As
save image: Save Image
#preferences
preferences: Preferences
display: Display
directories: Directories
updates: Updates
update check: Update Check
locate apprentice: Locate Apprentice
# select
select columns: Select Columns
select cards: Select Cards
# slice
slice image: Slice Image
# print
print preview: Print Preview
############################################################## Action (undo/redo) names
......
......@@ -45,10 +45,10 @@ SetWindow::SetWindow(Window* parent, const SetP& set)
// initialize menu bar
wxMenuBar* menuBar = new wxMenuBar();
IconMenu* menuFile = new IconMenu();
menuFile->Append(ID_FILE_NEW, _("TOOL_NEW"), _MENU_("new"), _HELP_("new"));
menuFile->Append(ID_FILE_OPEN, _("TOOL_OPEN"), _MENU_("open"), _HELP_("open"));
menuFile->Append(ID_FILE_SAVE, _("TOOL_SAVE"), _MENU_("save"), _HELP_("save"));
menuFile->Append(ID_FILE_SAVE_AS, _MENU_("save as"), _HELP_("save as"));
menuFile->Append(ID_FILE_NEW, _("TOOL_NEW"), _MENU_("new set"), _HELP_("new set"));
menuFile->Append(ID_FILE_OPEN, _("TOOL_OPEN"), _MENU_("open set"), _HELP_("open set"));
menuFile->Append(ID_FILE_SAVE, _("TOOL_SAVE"), _MENU_("save set"), _HELP_("save set"));
menuFile->Append(ID_FILE_SAVE_AS, _MENU_("save set as"), _HELP_("save set as"));
IconMenu* menuExport = new IconMenu();
menuExport->Append(ID_FILE_EXPORT_HTML, _("&HTML..."), _("Export the set to a HTML file"));
menuExport->Append(ID_FILE_EXPORT_IMAGE, _("Card &Image..."), _("Export the selected card to an image file"));
......@@ -68,18 +68,18 @@ SetWindow::SetWindow(Window* parent, const SetP& set)
menuBar->Append(menuFile, _MENU_("file"));
IconMenu* menuEdit = new IconMenu();
menuEdit->Append(ID_EDIT_UNDO, _("TOOL_UNDO"), _MENU_("undo"), _HELP_("undo"));
menuEdit->Append(ID_EDIT_REDO, _("TOOL_REDO"), _MENU_("redo"), _HELP_("redo"));
menuEdit->Append(ID_EDIT_UNDO, _("TOOL_UNDO"), _MENU_1_("undo",wxEmptyString), _HELP_("undo"));
menuEdit->Append(ID_EDIT_REDO, _("TOOL_REDO"), _MENU_1_("redo",wxEmptyString), _HELP_("redo"));
menuEdit->AppendSeparator();
menuEdit->Append(ID_EDIT_CUT, _("TOOL_CUT"), _MENU_("cut"), _("Move the selected text to the clipboard"));
menuEdit->Append(ID_EDIT_COPY, _("TOOL_COPY"), _MENU_("copy"), _("Place the selected text on the clipboard"));
menuEdit->Append(ID_EDIT_PASTE, _("TOOL_PASTE"), _MENU_("paste"), _("Inserts the text from the clipboard"));
menuEdit->Append(ID_EDIT_CUT, _("TOOL_CUT"), _MENU_("cut"), _HELP_("cut"));
menuEdit->Append(ID_EDIT_COPY, _("TOOL_COPY"), _MENU_("copy"), _HELP_("copy"));
menuEdit->Append(ID_EDIT_PASTE, _("TOOL_PASTE"), _MENU_("paste"), _HELP_("paste"));
menuEdit->AppendSeparator();
menuEdit->Append(ID_EDIT_FIND, _("TOOL_FIND"), _MENU_("find"), _(""));
menuEdit->Append(ID_EDIT_FIND_NEXT, _MENU_("find next"), _(""));
menuEdit->Append(ID_EDIT_REPLACE, _MENU_("replace"), _(""));
menuEdit->AppendSeparator();
menuEdit->Append(ID_EDIT_PREFERENCES, _MENU_("preferences"), _("Change the configuration of Magic Set Editor"));
menuEdit->Append(ID_EDIT_PREFERENCES, _MENU_("preferences"), _HELP_("preferences"));
menuBar->Append(menuEdit, _MENU_("edit"));
IconMenu* menuWindow = new IconMenu();
......@@ -88,7 +88,7 @@ SetWindow::SetWindow(Window* parent, const SetP& set)
menuBar->Append(menuWindow, _MENU_("window"));
IconMenu* menuHelp = new IconMenu();
menuHelp->Append(ID_HELP_INDEX, _("TOOL_HELP"), _("&Index..\tF1"), _(""));
menuHelp->Append(ID_HELP_INDEX, _("TOOL_HELP"), _("&Index..\tF1"), _(""));
menuHelp->AppendSeparator();
menuHelp->Append(ID_HELP_ABOUT, _MENU_("about"), _(""));
menuBar->Append(menuHelp, _MENU_("help"));
......@@ -102,16 +102,16 @@ SetWindow::SetWindow(Window* parent, const SetP& set)
// tool bar
wxToolBar* tb = CreateToolBar(wxTB_FLAT | wxNO_BORDER | wxTB_HORIZONTAL);
tb->SetToolBitmapSize(wxSize(18,18));
tb->AddTool(ID_FILE_NEW, _(""), Bitmap(_("TOOL_NEW")), wxNullBitmap, wxITEM_NORMAL, _("New set"), _("Creates a new set"));
tb->AddTool(ID_FILE_OPEN, _(""), Bitmap(_("TOOL_OPEN")), wxNullBitmap, wxITEM_NORMAL, _("Open set"), _("Opens an existing set"));
tb->AddTool(ID_FILE_SAVE, _(""), Bitmap(_("TOOL_SAVE")), wxNullBitmap, wxITEM_NORMAL, _("Save set"), _("Saves the current set"));
tb->AddTool(ID_FILE_NEW, _(""), Bitmap(_("TOOL_NEW")), wxNullBitmap, wxITEM_NORMAL, _TOOL_("new set"), _HELP_("new set"));
tb->AddTool(ID_FILE_OPEN, _(""), Bitmap(_("TOOL_OPEN")), wxNullBitmap, wxITEM_NORMAL, _TOOL_("open set"), _HELP_("open set"));
tb->AddTool(ID_FILE_SAVE, _(""), Bitmap(_("TOOL_SAVE")), wxNullBitmap, wxITEM_NORMAL, _TOOL_("save set"), _HELP_("save set"));
tb->AddSeparator();
tb->AddTool(ID_EDIT_CUT, _(""), Bitmap(_("TOOL_CUT")), wxNullBitmap, wxITEM_NORMAL, _("Cut"));
tb->AddTool(ID_EDIT_COPY, _(""), Bitmap(_("TOOL_COPY")), wxNullBitmap, wxITEM_NORMAL, _("Copy"));
tb->AddTool(ID_EDIT_PASTE, _(""), Bitmap(_("TOOL_PASTE")),wxNullBitmap, wxITEM_NORMAL, _("Paste"));
tb->AddTool(ID_EDIT_CUT, _(""), Bitmap(_("TOOL_CUT")), wxNullBitmap, wxITEM_NORMAL, _TOOL_("cut"));
tb->AddTool(ID_EDIT_COPY, _(""), Bitmap(_("TOOL_COPY")), wxNullBitmap, wxITEM_NORMAL, _TOOL_("copy"));
tb->AddTool(ID_EDIT_PASTE, _(""), Bitmap(_("TOOL_PASTE")),wxNullBitmap, wxITEM_NORMAL, _TOOL_("paste"));
tb->AddSeparator();
tb->AddTool(ID_EDIT_UNDO, _(""), Bitmap(_("TOOL_UNDO")), wxNullBitmap, wxITEM_NORMAL, _("Undo"));
tb->AddTool(ID_EDIT_REDO, _(""), Bitmap(_("TOOL_REDO")), wxNullBitmap, wxITEM_NORMAL, _("Redo"));
tb->AddTool(ID_EDIT_UNDO, _(""), Bitmap(_("TOOL_UNDO")), wxNullBitmap, wxITEM_NORMAL, _TOOL_1_("undo",wxEmptyString));
tb->AddTool(ID_EDIT_REDO, _(""), Bitmap(_("TOOL_REDO")), wxNullBitmap, wxITEM_NORMAL, _TOOL_1_("redo",wxEmptyString));
tb->AddSeparator();
tb->Realize();
......@@ -328,14 +328,14 @@ void SetWindow::onUpdateUI(wxUpdateUIEvent& ev) {
case ID_EDIT_UNDO: {
ev.Enable(set->actions.canUndo());
String label = set->actions.undoName();
ev.SetText(label + _("\tCtrl+Z"));
GetToolBar()->SetToolShortHelp(ID_EDIT_UNDO, label);
ev.SetText(_MENU_1_("undo", label));
GetToolBar()->SetToolShortHelp(ID_EDIT_UNDO, _TOOL_1_("undo", label));
break;
} case ID_EDIT_REDO: {
ev.Enable(set->actions.canRedo());
String label = set->actions.redoName();
ev.SetText(label + _("\tF4"));
GetToolBar()->SetToolShortHelp(ID_EDIT_REDO, label);
ev.SetText(_MENU_1_("redo", label));
GetToolBar()->SetToolShortHelp(ID_EDIT_REDO, _TOOL_1_("redo", label));
break;
}
// copy & paste & find
......@@ -384,7 +384,7 @@ void SetWindow::onFileNew(wxCommandEvent&) {
void SetWindow::onFileOpen(wxCommandEvent&) {
if (!askSaveAndContinue()) return;
wxFileDialog dlg(this, _("Open a set"), _(""), _(""), import_formats(), wxOPEN);
wxFileDialog dlg(this, _TITLE_("open set"), _(""), _(""), import_formats(), wxOPEN);
if (dlg.ShowModal() == wxID_OK) {
setSet(import_set(dlg.GetPath()));
}
......@@ -401,7 +401,7 @@ void SetWindow::onFileSave(wxCommandEvent& ev) {
}
void SetWindow::onFileSaveAs(wxCommandEvent&) {
wxFileDialog dlg(this, _("Save a set"), _(""), _(""), export_formats(*set->game), wxSAVE | wxOVERWRITE_PROMPT);
wxFileDialog dlg(this, _TITLE_("save set"), _(""), _(""), export_formats(*set->game), wxSAVE | wxOVERWRITE_PROMPT);
if (dlg.ShowModal() == wxID_OK) {
export_set(*set, dlg.GetPath(), dlg.GetFilterIndex());
}
......@@ -416,11 +416,11 @@ void SetWindow::onFileInspect(wxCommandEvent&) {
void SetWindow::onFileExportImage(wxCommandEvent&) {
CardP card = current_panel->selectedCard();
if (!card) return; // no card selected
String name = wxFileSelector(_("Save image"), _(""), card->identification(), _(""),
String name = wxFileSelector(_TITLE_("save image"), _(""), card->identification(), _(""),
_("JPEG images (*.jpg)|*.jpg|Windows bitmaps (*.bmp)|*.bmp|PNG images (*.png)|*.png|GIF images (*.gif)|*.gif|TIFF images (*.tif)|*.tif"),
wxSAVE | wxOVERWRITE_PROMPT, this);
if (!name.empty()) {
// exportImage(set, card, name);
export_image(set, card, name);
}
}
......
......@@ -54,30 +54,30 @@ void SymbolWindow::init(Window* parent, SymbolP symbol) {
// Menu bar
wxMenuBar* menuBar = new wxMenuBar();
IconMenu* menuFile = new IconMenu();
menuFile->Append(ID_FILE_NEW, _("TOOL_NEW"), _("&New...\tCtrl+N"), _("Create a new symbol"));
menuFile->Append(ID_FILE_OPEN, _("TOOL_OPEN"), _("&Open...\tCtrl+O"), _("Open a symbol"));
menuFile->Append(ID_FILE_SAVE, _("TOOL_SAVE"), _("&Save\tCtrl+S"), _("Save the symbol"));
menuFile->Append(ID_FILE_SAVE_AS, _("Save &As...\tF12"), _("Save the symbol under a diferent filename"));
menuFile->Append(ID_FILE_NEW, _("TOOL_NEW"), _MENU_("new symbol"), _HELP_("new symbol"));
menuFile->Append(ID_FILE_OPEN, _("TOOL_OPEN"), _MENU_("open symbol"), _HELP_("open symbol"));
menuFile->Append(ID_FILE_SAVE, _("TOOL_SAVE"), _MENU_("save symbol"), _HELP_("save symbol"));
menuFile->Append(ID_FILE_SAVE_AS, _MENU_("save symbol as"), _HELP_("save symbol as"));
menuFile->AppendSeparator();
menuFile->Append(ID_FILE_STORE, _("TOOL_APPLY"), _("S&tore\tCtrl+Enter"), _("Stores the symbol in the set"));
menuFile->Append(ID_FILE_STORE, _("TOOL_APPLY"), _MENU_("store symbol"), _HELP_("store symbol"));
menuFile->AppendSeparator();
menuFile->Append(ID_FILE_EXIT, _("&Close\tAlt+F4"), _("Closes the symbol editor"));
menuBar->Append(menuFile, _("&File"));
menuFile->Append(ID_FILE_EXIT, _MENU_("close symbol editor"), _HELP_("close symbol editor"));
menuBar->Append(menuFile, _MENU_("file"));
IconMenu* menuEdit = new IconMenu();
menuEdit->Append(ID_EDIT_UNDO, _("TOOL_UNDO"), _("&Undo\tCtrl+Z"), _("Undoes the last action"));
menuEdit->Append(ID_EDIT_REDO, _("TOOL_REDO"), _("&Redo\tF4"), _(""));
menuEdit->Append(ID_EDIT_UNDO, _("TOOL_UNDO"), _MENU_1_("undo",wxEmptyString), _HELP_("undo"));
menuEdit->Append(ID_EDIT_REDO, _("TOOL_REDO"), _MENU_1_("redo",wxEmptyString), _HELP_("redo"));
menuEdit->AppendSeparator();
menuEdit->Append(ID_EDIT_DUPLICATE, _("TOOL_DUPLICATE"), _("&Duplicate\tCtrl+D"),_("Duplicates the selected shapes"));
menuBar->Append(menuEdit, _("&Edit"));
menuEdit->Append(ID_EDIT_DUPLICATE, _("TOOL_DUPLICATE"), _MENU_("duplicate"), _HELP_("duplicate"));
menuBar->Append(menuEdit, _MENU_("edit"));
IconMenu* menuTool = new IconMenu();
menuTool->Append(ID_MODE_SELECT, _("TOOL_MODE_SELECT"), _("&Select\tF5"), _("Select and move shapes"), wxITEM_CHECK);
menuTool->Append(ID_MODE_ROTATE, _("TOOL_MODE_ROTATE"), _("&Rotate\tF6"), _("Rotate and shear shapes"), wxITEM_CHECK);
menuTool->Append(ID_MODE_POINTS, _("TOOL_MODE_CURVE"), _("&Points\tF7"), _("Edit control points for a shape in the symbol"), wxITEM_CHECK);
menuTool->Append(ID_MODE_SHAPES, _("TOOL_CIRCLE"), _("&Basic Shapes\tF8"), _("Draw basic shapes, such as rectangles and circles"), wxITEM_CHECK);
menuTool->Append(ID_MODE_PAINT, _("TOOL_MODE_PAINT"), _("P&aint\tF9"), _("Paint on the shape using a paintbrush"), wxITEM_CHECK);
menuBar->Append(menuTool, _("&Tool"));
menuTool->Append(ID_MODE_SELECT, _("TOOL_MODE_SELECT"), _MENU_("select"), _HELP_("select"), wxITEM_CHECK);
menuTool->Append(ID_MODE_ROTATE, _("TOOL_MODE_ROTATE"), _MENU_("rotate"), _HELP_("rotate"), wxITEM_CHECK);
menuTool->Append(ID_MODE_POINTS, _("TOOL_MODE_CURVE"), _MENU_("points"), _HELP_("points"), wxITEM_CHECK);
menuTool->Append(ID_MODE_SHAPES, _("TOOL_CIRCLE"), _MENU_("basic shapes"), _HELP_("basic shapes"), wxITEM_CHECK);
menuTool->Append(ID_MODE_PAINT, _("TOOL_MODE_PAINT"), _MENU_("paint"), _HELP_("paint"), wxITEM_CHECK);
menuBar->Append(menuTool, _MENU_("tool"));
SetMenuBar(menuBar);
......@@ -87,23 +87,23 @@ void SymbolWindow::init(Window* parent, SymbolP symbol) {
// Toolbar
wxToolBar* tb = CreateToolBar(wxTB_FLAT | wxNO_BORDER | wxTB_HORIZONTAL | wxTB_TEXT);
tb->AddTool(ID_FILE_STORE, _("Store"), Bitmap(_("TOOL_APPLY")), wxNullBitmap, wxITEM_NORMAL, _("Store symbol in set"), _("Stores the symbol in the set"));
tb->AddTool(ID_FILE_STORE, _("Store"), Bitmap(_("TOOL_APPLY")), wxNullBitmap, wxITEM_NORMAL, _TOOL_("store symbol"), _HELP_("store symbol"));
tb->AddSeparator();
tb->AddTool(ID_EDIT_UNDO, _("Undo"), Bitmap(_("TOOL_UNDO")), wxNullBitmap, wxITEM_NORMAL, _("Undo"), _("Undoes the last action"));
tb->AddTool(ID_EDIT_REDO, _("Redo"), Bitmap(_("TOOL_REDO")), wxNullBitmap, wxITEM_NORMAL, _("Redo"), _("Redoes the last action undone"));
tb->AddTool(ID_EDIT_UNDO, _("Undo"), Bitmap(_("TOOL_UNDO")), wxNullBitmap, wxITEM_NORMAL, _TOOL_1_("undo",wxEmptyString));
tb->AddTool(ID_EDIT_REDO, _("Redo"), Bitmap(_("TOOL_REDO")), wxNullBitmap, wxITEM_NORMAL, _TOOL_1_("redo",wxEmptyString));
tb->Realize();
// Edit mode toolbar
wxPanel* emp = new wxPanel(this, wxID_ANY);
wxToolBar* em = new wxToolBar(emp, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTB_FLAT | wxTB_VERTICAL | wxTB_TEXT | wxTB_HORZ_LAYOUT);
em->AddTool(ID_MODE_SELECT,_("Select"), Bitmap(_("TOOL_MODE_SELECT")), wxNullBitmap, wxITEM_CHECK, _("Select (F5)"), _("Select and move parts of the symbol"));
em->AddTool(ID_MODE_ROTATE,_("Rotate"), Bitmap(_("TOOL_MODE_ROTATE")), wxNullBitmap, wxITEM_CHECK, _("Rotate (F6)"), _("Rotate and shear parts of the symbol"));
em->AddTool(ID_MODE_SELECT,_("Select"), Bitmap(_("TOOL_MODE_SELECT")), wxNullBitmap, wxITEM_CHECK, _TOOL_("select"), _HELP_("select"));
em->AddTool(ID_MODE_ROTATE,_("Rotate"), Bitmap(_("TOOL_MODE_ROTATE")), wxNullBitmap, wxITEM_CHECK, _TOOL_("rotate"), _HELP_("rotate"));
em->AddSeparator();
em->AddTool(ID_MODE_POINTS,_("Points"), Bitmap(_("TOOL_MODE_CURVE")), wxNullBitmap, wxITEM_CHECK, _("Points (F7)"), _("Edit control points for a shape in the symbol"));
em->AddTool(ID_MODE_POINTS,_("Points"), Bitmap(_("TOOL_MODE_CURVE")), wxNullBitmap, wxITEM_CHECK, _TOOL_("points"), _HELP_("points"));
em->AddSeparator();
em->AddTool(ID_MODE_SHAPES,_("Basic Shapes"), Bitmap(_("TOOL_CIRCLE")), wxNullBitmap, wxITEM_CHECK, _("Basic Shapes (F8)"), _("Draw basic shapes, such as rectangles and circles"));
em->AddTool(ID_MODE_SHAPES,_("Basic Shapes"), Bitmap(_("TOOL_CIRCLE")), wxNullBitmap, wxITEM_CHECK, _TOOL_("basic shapes"), _HELP_("basic shapes"));
em->AddSeparator();
em->AddTool(ID_MODE_PAINT, _("Paint"), Bitmap(_("TOOL_MODE_PAINT")), wxNullBitmap, wxITEM_CHECK, _("Paint on shape (F9)"), _("Paint on the shape using a paintbrush"));
em->AddTool(ID_MODE_PAINT, _("Paint"), Bitmap(_("TOOL_MODE_PAINT")), wxNullBitmap, wxITEM_CHECK, _TOOL_("paint"), _HELP_("paint"));
em->AddSeparator();
em->Realize();
......@@ -216,14 +216,14 @@ void SymbolWindow::onUpdateUI(wxUpdateUIEvent& ev) {
} case ID_EDIT_UNDO: {
ev.Enable(control->getSymbol()->actions.canUndo());
String label = control->getSymbol()->actions.undoName();
ev.SetText(label + _("\tCtrl+Z"));
GetToolBar()->SetToolShortHelp(ID_EDIT_UNDO, label);
ev.SetText(_MENU_1_("undo", label));
GetToolBar()->SetToolShortHelp(ID_EDIT_UNDO, _TOOL_1_("undo", label));
break;
} case ID_EDIT_REDO: {
ev.Enable(control->getSymbol()->actions.canRedo());
String label = control->getSymbol()->actions.redoName();
ev.SetText(label + _("\tF4"));
GetToolBar()->SetToolShortHelp(ID_EDIT_REDO, label);
ev.SetText(_MENU_1_("redo", label));
GetToolBar()->SetToolShortHelp(ID_EDIT_REDO, _TOOL_1_("redo", label));
break;
} default: {
// items created by the editor control
......
......@@ -71,16 +71,16 @@ bool ActionStack::canRedo() const {
String ActionStack::undoName() const {
if (canUndo()) {
return _("Undo ") + capitalize(undo_actions.back()->getName(true));
return _(" ") + capitalize(undo_actions.back()->getName(true));
} else {
return _("Undo");
return wxEmptyString;
}
}
String ActionStack::redoName() const {
if (canRedo()) {
return _("Redo ") + capitalize(redo_actions.back()->getName(false));
return _(" ") + capitalize(redo_actions.back()->getName(false));
} else {
return _("Redo");
return wxEmptyString;
}
}
......
......@@ -56,6 +56,12 @@ String tr(LocaleCategory cat, const String& key);
/// A localized string for error messages
#define _ERROR_(s) tr(LOCALE_CAT_ERROR, _(s))
/// A localized string for menus/toolbar buttons, with 1 argument (printf style)
#define _MENU_1_(s,a) String::Format(tr(LOCALE_CAT_MENU, _(s)), a)
/// A localized string for tooltip text, with 1 argument (printf style)
#define _TOOL_1_(s,a) String::Format(tr(LOCALE_CAT_TOOL, _(s)), a)
/// A localized string for error messages, with 1 argument (printf style)
#define _ERROR_1_(s,a) String::Format(tr(LOCALE_CAT_ERROR, _(s)), a)
/// A localized string for error messages, with 2 argument (printf style)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment