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:
Matt Madia
2010-05-07 00:25:49 +00:00
parent cd59396f27
commit dd4b6c23f6
3 changed files with 38 additions and 34 deletions
+4 -4
View File
@@ -30,7 +30,7 @@ HApp::HApp()
BRect rect; BRect rect;
rect.Set(200, 150, 590, 570); rect.Set(200, 150, 590, 570);
HWindow* window = new HWindow(rect, TR("Sounds")); HWindow* window = new HWindow(rect, B_TRANSLATE("Sounds"));
window->Show(); window->Show();
} }
@@ -43,14 +43,14 @@ HApp::~HApp()
void void
HApp::AboutRequested() HApp::AboutRequested()
{ {
BAlert* alert = new BAlert(TR("About Sounds"), BAlert* alert = new BAlert(B_TRANSLATE("About Sounds"),
TR("Sounds\n" B_TRANSLATE("Sounds\n"
" Brought to you by :\n" " Brought to you by :\n"
"\tOliver Ruiz Dorantes\n" "\tOliver Ruiz Dorantes\n"
"\tJérôme DUVAL.\n" "\tJérôme DUVAL.\n"
" Original work from Atsushi Takamatsu.\n" " Original work from Atsushi Takamatsu.\n"
"Copyright ©2003-2006 Haiku"), "Copyright ©2003-2006 Haiku"),
TR("OK")); B_TRANSLATE("OK"));
alert->Go(); alert->Go();
} }
+6 -6
View File
@@ -43,7 +43,7 @@ HEventRow::SetPath(const char* _path)
{ {
fPath = _path; fPath = _path;
BPath path(_path); BPath path(_path);
SetField(new BStringField(_path ? path.Leaf() : TR("<none>")), SetField(new BStringField(_path ? path.Leaf() : B_TRANSLATE("<none>")),
kSoundColumn); kSoundColumn);
} }
@@ -60,10 +60,10 @@ HEventList::HEventList(const char* name)
BColumnListView(name, 0, B_PLAIN_BORDER, true), BColumnListView(name, 0, B_PLAIN_BORDER, true),
fType(NULL) fType(NULL)
{ {
AddColumn(new BStringColumn(TR("Event"), 150, 50, 500, B_TRUNCATE_MIDDLE), AddColumn(new BStringColumn(B_TRANSLATE("Event"), 150, 50, 500,
kEventColumn); B_TRUNCATE_MIDDLE), kEventColumn);
AddColumn(new BStringColumn(TR("Sound"), 150, 50, 500, B_TRUNCATE_END), AddColumn(new BStringColumn(B_TRANSLATE("Sound"), 150, 50, 500,
kSoundColumn); B_TRUNCATE_END), kSoundColumn);
} }
@@ -126,7 +126,7 @@ HEventList::SelectionChanged()
printf("name %s\n", ref.name); printf("name %s\n", ref.name);
BMediaFiles().RemoveRefFor(fType, row->Name(), ref); BMediaFiles().RemoveRefFor(fType, row->Name(), ref);
BAlert* alert = new BAlert("alert", 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(); alert->Go();
return; return;
} }
+16 -12
View File
@@ -104,17 +104,20 @@ HWindow::InitGUI()
menu->SetRadioMode(true); menu->SetRadioMode(true);
menu->SetLabelFromMarked(true); menu->SetLabelFromMarked(true);
menu->AddSeparatorItem(); menu->AddSeparatorItem();
menu->AddItem(new BMenuItem(TR("<none>"), new BMessage(M_NONE_MESSAGE))); menu->AddItem(new BMenuItem(B_TRANSLATE("<none>"),
menu->AddItem(new BMenuItem(TR("Other" B_UTF8_ELLIPSIS), new BMessage(M_NONE_MESSAGE)));
menu->AddItem(new BMenuItem(B_TRANSLATE("Other" B_UTF8_ELLIPSIS),
new BMessage(M_OTHER_MESSAGE))); new BMessage(M_OTHER_MESSAGE)));
BMenuField* menuField = new BMenuField("filemenu", TR("Sound File:"), menu); BMenuField* menuField = new BMenuField("filemenu",
menuField->SetDivider(menuField->StringWidth(TR("Sound File:")) + 10); 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)); new BMessage(M_STOP_MESSAGE));
stopbutton->SetEnabled(false); stopbutton->SetEnabled(false);
BButton* playbutton = new BButton("play", TR("Play"), BButton* playbutton = new BButton("play", B_TRANSLATE("Play"),
new BMessage(M_PLAY_MESSAGE)); new BMessage(M_PLAY_MESSAGE));
playbutton->SetEnabled(false); playbutton->SetEnabled(false);
@@ -145,7 +148,7 @@ HWindow::InitGUI()
// setup file menu // setup file menu
SetupMenuField(); 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) { if (row != NULL) {
BPath path(row->Path()); BPath path(row->Path());
if (path.InitCheck() != B_OK) { if (path.InitCheck() != B_OK) {
BMenuItem* item = menu->FindItem(TR("<none>")); BMenuItem* item = menu->FindItem(B_TRANSLATE("<none>"));
if (item != NULL) if (item != NULL)
item->SetMarked(true); item->SetMarked(true);
} else { } else {
@@ -201,9 +204,10 @@ HWindow::MessageReceived(BMessage* message)
if (superType.Type() == NULL if (superType.Type() == NULL
|| strcmp(superType.Type(), "audio") != 0) { || strcmp(superType.Type(), "audio") != 0) {
beep(); beep();
BAlert* alert = new BAlert("", TR("This is not an audio " BAlert* alert = new BAlert("",
"file."), TR("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_TRANSLATE("This is not an audio file."),
B_STOP_ALERT); B_TRANSLATE("OK"), NULL, NULL,
B_WIDTH_AS_USUAL, B_STOP_ALERT);
alert->Go(); alert->Go();
break; break;
} }
@@ -264,7 +268,7 @@ HWindow::MessageReceived(BMessage* message)
if (message->FindString("path", &path) == B_OK) { if (message->FindString("path", &path) == B_OK) {
BPath path(path); BPath path(path);
if (path.InitCheck() != B_OK) { if (path.InitCheck() != B_OK) {
BMenuItem* item = menu->FindItem(TR("<none>")); BMenuItem* item = menu->FindItem(B_TRANSLATE("<none>"));
if (item != NULL) if (item != NULL)
item->SetMarked(true); item->SetMarked(true);
} else { } else {