1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-11 23:54:18 +00:00

Refactored some TRANS strings to make them more amenable to translation. Added the NEEDS_TRANS macro.

This commit is contained in:
jules 2013-05-05 17:13:53 +01:00
parent ffc9200ea7
commit 4d61bfd8a3
13 changed files with 101 additions and 89 deletions

View file

@ -96,7 +96,7 @@ public:
AlertWindow::NoIcon),
owner (kec)
{
addButton (TRANS("Ok"), 1);
addButton (TRANS("OK"), 1);
addButton (TRANS("Cancel"), 0);
// (avoid return + escape keys getting processed by the buttons..)
@ -110,13 +110,15 @@ public:
bool keyPressed (const KeyPress& key)
{
lastPress = key;
String message (TRANS("Key: ") + owner.getDescriptionForKeyPress (key));
String message (TRANS("Key") + ": " + owner.getDescriptionForKeyPress (key));
const CommandID previousCommand = owner.getMappings().findCommandForKeyPress (key);
if (previousCommand != 0)
message << "\n\n" << TRANS("(Currently assigned to \"")
<< owner.getCommandManager().getNameOfCommand (previousCommand) << "\")";
message << "\n\n("
<< TRANS("Currently assigned to \"CMDN\"")
.replace ("CMDN", owner.getCommandManager().getNameOfCommand (previousCommand))
<< ')';
setMessage (message);
return true;
@ -160,9 +162,10 @@ public:
{
AlertWindow::showOkCancelBox (AlertWindow::WarningIcon,
TRANS("Change key-mapping"),
TRANS("This key is already assigned to the command \"")
+ owner.getCommandManager().getNameOfCommand (previousCommand)
+ TRANS("\"\n\nDo you want to re-assign it to this new command instead?"),
TRANS("This key is already assigned to the command \"CMDN\"")
.replace ("CMDN", owner.getCommandManager().getNameOfCommand (previousCommand))
+ "\n\n"
+ TRANS("Do you want to re-assign it to this new command instead?"),
TRANS("Re-assign"),
TRANS("Cancel"),
this,