Updated to use B_TRANSLATE* macros. relates to #5408.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36686 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -32,9 +32,10 @@ KeyboardApplication::MessageReceived(BMessage* message)
|
|||||||
switch (message->what) {
|
switch (message->what) {
|
||||||
case ERROR_DETECTED:
|
case ERROR_DETECTED:
|
||||||
{
|
{
|
||||||
BAlert* errorAlert = new BAlert("Error", TR("Something has gone wrong!"),
|
BAlert* errorAlert = new BAlert("Error",
|
||||||
TR("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_OFFSET_SPACING,
|
B_TRANSLATE("Something has gone wrong!"),
|
||||||
B_WARNING_ALERT);
|
B_TRANSLATE("OK"), NULL, NULL,
|
||||||
|
B_WIDTH_AS_USUAL, B_OFFSET_SPACING, B_WARNING_ALERT);
|
||||||
errorAlert->Go();
|
errorAlert->Go();
|
||||||
be_app->PostMessage(B_QUIT_REQUESTED);
|
be_app->PostMessage(B_QUIT_REQUESTED);
|
||||||
break;
|
break;
|
||||||
@@ -49,7 +50,8 @@ KeyboardApplication::MessageReceived(BMessage* message)
|
|||||||
void
|
void
|
||||||
KeyboardApplication::AboutRequested()
|
KeyboardApplication::AboutRequested()
|
||||||
{
|
{
|
||||||
(new BAlert("about", TR("Written by Andrew Edward McCall"), TR("OK")))->Go();
|
(new BAlert("about", B_TRANSLATE("Written by Andrew Edward McCall"),
|
||||||
|
B_TRANSLATE("OK")))->Go();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -34,30 +34,30 @@ KeyboardView::KeyboardView()
|
|||||||
|
|
||||||
// Create the "Key repeat rate" slider...
|
// Create the "Key repeat rate" slider...
|
||||||
fRepeatSlider = new BSlider("key_repeat_rate",
|
fRepeatSlider = new BSlider("key_repeat_rate",
|
||||||
TR("Key repeat rate"),
|
B_TRANSLATE("Key repeat rate"),
|
||||||
new BMessage(SLIDER_REPEAT_RATE),
|
new BMessage(SLIDER_REPEAT_RATE),
|
||||||
20, 300, B_HORIZONTAL);
|
20, 300, B_HORIZONTAL);
|
||||||
fRepeatSlider->SetHashMarks(B_HASH_MARKS_BOTTOM);
|
fRepeatSlider->SetHashMarks(B_HASH_MARKS_BOTTOM);
|
||||||
fRepeatSlider->SetHashMarkCount(5);
|
fRepeatSlider->SetHashMarkCount(5);
|
||||||
fRepeatSlider->SetLimitLabels(TR("Slow"),TR("Fast"));
|
fRepeatSlider->SetLimitLabels(B_TRANSLATE("Slow"),B_TRANSLATE("Fast"));
|
||||||
|
|
||||||
|
|
||||||
// Create the "Delay until key repeat" slider...
|
// Create the "Delay until key repeat" slider...
|
||||||
fDelaySlider = new BSlider("delay_until_key_repeat",
|
fDelaySlider = new BSlider("delay_until_key_repeat",
|
||||||
TR("Delay until key repeat"),
|
B_TRANSLATE("Delay until key repeat"),
|
||||||
new BMessage(SLIDER_DELAY_RATE),
|
new BMessage(SLIDER_DELAY_RATE),
|
||||||
250000, 1000000, B_HORIZONTAL);
|
250000, 1000000, B_HORIZONTAL);
|
||||||
fDelaySlider->SetHashMarks(B_HASH_MARKS_BOTTOM);
|
fDelaySlider->SetHashMarks(B_HASH_MARKS_BOTTOM);
|
||||||
fDelaySlider->SetHashMarkCount(4);
|
fDelaySlider->SetHashMarkCount(4);
|
||||||
fDelaySlider->SetLimitLabels(TR("Short"),TR("Long"));
|
fDelaySlider->SetLimitLabels(B_TRANSLATE("Short"),B_TRANSLATE("Long"));
|
||||||
|
|
||||||
// Create the "Typing test area" text box...
|
// Create the "Typing test area" text box...
|
||||||
BTextControl* textcontrol = new BTextControl(NULL,
|
BTextControl* textcontrol = new BTextControl(NULL,
|
||||||
TR("Typing test area"),
|
B_TRANSLATE("Typing test area"),
|
||||||
new BMessage('TTEA'));
|
new BMessage('TTEA'));
|
||||||
textcontrol->SetAlignment(B_ALIGN_LEFT, B_ALIGN_CENTER);
|
textcontrol->SetAlignment(B_ALIGN_LEFT, B_ALIGN_CENTER);
|
||||||
textcontrol->SetExplicitMinSize(BSize(
|
textcontrol->SetExplicitMinSize(BSize(
|
||||||
textcontrol->StringWidth(TR("Typing test area")), B_SIZE_UNSET));
|
textcontrol->StringWidth(B_TRANSLATE("Typing test area")), B_SIZE_UNSET));
|
||||||
|
|
||||||
// Build the layout
|
// Build the layout
|
||||||
SetLayout(new BGroupLayout(B_HORIZONTAL));
|
SetLayout(new BGroupLayout(B_HORIZONTAL));
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
#define TR_CONTEXT "KeyboardWindow"
|
#define TR_CONTEXT "KeyboardWindow"
|
||||||
|
|
||||||
KeyboardWindow::KeyboardWindow()
|
KeyboardWindow::KeyboardWindow()
|
||||||
: BWindow(BRect(0, 0, 200, 200), TR("Keyboard"), B_TITLED_WINDOW,
|
: BWindow(BRect(0, 0, 200, 200), B_TRANSLATE("Keyboard"), B_TITLED_WINDOW,
|
||||||
B_NOT_RESIZABLE | B_NOT_ZOOMABLE | B_ASYNCHRONOUS_CONTROLS
|
B_NOT_RESIZABLE | B_NOT_ZOOMABLE | B_ASYNCHRONOUS_CONTROLS
|
||||||
| B_AUTO_UPDATE_SIZE_LIMITS)
|
| B_AUTO_UPDATE_SIZE_LIMITS)
|
||||||
{
|
{
|
||||||
@@ -40,10 +40,10 @@ KeyboardWindow::KeyboardWindow()
|
|||||||
fSettingsBox->AddChild(fSettingsView);
|
fSettingsBox->AddChild(fSettingsView);
|
||||||
|
|
||||||
// Add the "Default" button..
|
// Add the "Default" button..
|
||||||
fDefaultsButton = new BButton(TR("Defaults"), new BMessage(BUTTON_DEFAULTS));
|
fDefaultsButton = new BButton(B_TRANSLATE("Defaults"), new BMessage(BUTTON_DEFAULTS));
|
||||||
|
|
||||||
// Add the "Revert" button...
|
// Add the "Revert" button...
|
||||||
fRevertButton = new BButton(TR("Revert"), new BMessage(BUTTON_REVERT));
|
fRevertButton = new BButton(B_TRANSLATE("Revert"), new BMessage(BUTTON_REVERT));
|
||||||
fRevertButton->SetEnabled(false);
|
fRevertButton->SetEnabled(false);
|
||||||
|
|
||||||
// Build the layout
|
// Build the layout
|
||||||
|
|||||||
Reference in New Issue
Block a user