Updated to use B_TRANSLATE* macros. relates to #5408.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36695 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -30,7 +30,7 @@ HApp::HApp()
|
||||
BRect rect;
|
||||
rect.Set(200, 150, 590, 570);
|
||||
|
||||
HWindow* window = new HWindow(rect, TR("Sounds"));
|
||||
HWindow* window = new HWindow(rect, B_TRANSLATE("Sounds"));
|
||||
window->Show();
|
||||
}
|
||||
|
||||
@@ -43,14 +43,14 @@ HApp::~HApp()
|
||||
void
|
||||
HApp::AboutRequested()
|
||||
{
|
||||
BAlert* alert = new BAlert(TR("About Sounds"),
|
||||
TR("Sounds\n"
|
||||
BAlert* alert = new BAlert(B_TRANSLATE("About Sounds"),
|
||||
B_TRANSLATE("Sounds\n"
|
||||
" Brought to you by :\n"
|
||||
"\tOliver Ruiz Dorantes\n"
|
||||
"\tJérôme DUVAL.\n"
|
||||
" Original work from Atsushi Takamatsu.\n"
|
||||
"Copyright ©2003-2006 Haiku"),
|
||||
TR("OK"));
|
||||
B_TRANSLATE("OK"));
|
||||
alert->Go();
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ HEventRow::SetPath(const char* _path)
|
||||
{
|
||||
fPath = _path;
|
||||
BPath path(_path);
|
||||
SetField(new BStringField(_path ? path.Leaf() : TR("<none>")),
|
||||
SetField(new BStringField(_path ? path.Leaf() : B_TRANSLATE("<none>")),
|
||||
kSoundColumn);
|
||||
}
|
||||
|
||||
@@ -60,10 +60,10 @@ HEventList::HEventList(const char* name)
|
||||
BColumnListView(name, 0, B_PLAIN_BORDER, true),
|
||||
fType(NULL)
|
||||
{
|
||||
AddColumn(new BStringColumn(TR("Event"), 150, 50, 500, B_TRUNCATE_MIDDLE),
|
||||
kEventColumn);
|
||||
AddColumn(new BStringColumn(TR("Sound"), 150, 50, 500, B_TRUNCATE_END),
|
||||
kSoundColumn);
|
||||
AddColumn(new BStringColumn(B_TRANSLATE("Event"), 150, 50, 500,
|
||||
B_TRUNCATE_MIDDLE), kEventColumn);
|
||||
AddColumn(new BStringColumn(B_TRANSLATE("Sound"), 150, 50, 500,
|
||||
B_TRUNCATE_END), kSoundColumn);
|
||||
}
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ HEventList::SelectionChanged()
|
||||
printf("name %s\n", ref.name);
|
||||
BMediaFiles().RemoveRefFor(fType, row->Name(), ref);
|
||||
BAlert* alert = new BAlert("alert",
|
||||
TR("No such file or directory"), TR("OK"));
|
||||
B_TRANSLATE("No such file or directory"), B_TRANSLATE("OK"));
|
||||
alert->Go();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -104,17 +104,20 @@ HWindow::InitGUI()
|
||||
menu->SetRadioMode(true);
|
||||
menu->SetLabelFromMarked(true);
|
||||
menu->AddSeparatorItem();
|
||||
menu->AddItem(new BMenuItem(TR("<none>"), new BMessage(M_NONE_MESSAGE)));
|
||||
menu->AddItem(new BMenuItem(TR("Other" B_UTF8_ELLIPSIS),
|
||||
menu->AddItem(new BMenuItem(B_TRANSLATE("<none>"),
|
||||
new BMessage(M_NONE_MESSAGE)));
|
||||
menu->AddItem(new BMenuItem(B_TRANSLATE("Other" B_UTF8_ELLIPSIS),
|
||||
new BMessage(M_OTHER_MESSAGE)));
|
||||
BMenuField* menuField = new BMenuField("filemenu", TR("Sound File:"), menu);
|
||||
menuField->SetDivider(menuField->StringWidth(TR("Sound File:")) + 10);
|
||||
BMenuField* menuField = new BMenuField("filemenu",
|
||||
B_TRANSLATE("Sound File:"), menu);
|
||||
menuField->SetDivider(menuField->StringWidth(B_TRANSLATE("Sound File:"))
|
||||
+ 10);
|
||||
|
||||
BButton* stopbutton = new BButton("stop", TR("Stop"),
|
||||
BButton* stopbutton = new BButton("stop", B_TRANSLATE("Stop"),
|
||||
new BMessage(M_STOP_MESSAGE));
|
||||
stopbutton->SetEnabled(false);
|
||||
|
||||
BButton* playbutton = new BButton("play", TR("Play"),
|
||||
BButton* playbutton = new BButton("play", B_TRANSLATE("Play"),
|
||||
new BMessage(M_PLAY_MESSAGE));
|
||||
playbutton->SetEnabled(false);
|
||||
|
||||
@@ -145,7 +148,7 @@ HWindow::InitGUI()
|
||||
|
||||
// setup file menu
|
||||
SetupMenuField();
|
||||
menu->FindItem(TR("<none>"))->SetMarked(true);
|
||||
menu->FindItem(B_TRANSLATE("<none>"))->SetMarked(true);
|
||||
}
|
||||
|
||||
|
||||
@@ -165,7 +168,7 @@ HWindow::MessageReceived(BMessage* message)
|
||||
if (row != NULL) {
|
||||
BPath path(row->Path());
|
||||
if (path.InitCheck() != B_OK) {
|
||||
BMenuItem* item = menu->FindItem(TR("<none>"));
|
||||
BMenuItem* item = menu->FindItem(B_TRANSLATE("<none>"));
|
||||
if (item != NULL)
|
||||
item->SetMarked(true);
|
||||
} else {
|
||||
@@ -201,9 +204,10 @@ HWindow::MessageReceived(BMessage* message)
|
||||
if (superType.Type() == NULL
|
||||
|| strcmp(superType.Type(), "audio") != 0) {
|
||||
beep();
|
||||
BAlert* alert = new BAlert("", TR("This is not an audio "
|
||||
"file."), TR("OK"), NULL, NULL, B_WIDTH_AS_USUAL,
|
||||
B_STOP_ALERT);
|
||||
BAlert* alert = new BAlert("",
|
||||
B_TRANSLATE("This is not an audio file."),
|
||||
B_TRANSLATE("OK"), NULL, NULL,
|
||||
B_WIDTH_AS_USUAL, B_STOP_ALERT);
|
||||
alert->Go();
|
||||
break;
|
||||
}
|
||||
@@ -264,7 +268,7 @@ HWindow::MessageReceived(BMessage* message)
|
||||
if (message->FindString("path", &path) == B_OK) {
|
||||
BPath path(path);
|
||||
if (path.InitCheck() != B_OK) {
|
||||
BMenuItem* item = menu->FindItem(TR("<none>"));
|
||||
BMenuItem* item = menu->FindItem(B_TRANSLATE("<none>"));
|
||||
if (item != NULL)
|
||||
item->SetMarked(true);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user