Updated to use B_TRANSLATE* macros. relates to #5408.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36669 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Matt Madia
2010-05-06 21:04:34 +00:00
parent 8c9c8c0e1f
commit b25cb34a47
3 changed files with 93 additions and 91 deletions
+1 -1
View File
@@ -51,7 +51,7 @@ MidiPlayerApp::AboutRequested()
{
(new BAlert(
NULL,
TR_CMT("Haiku MIDI Player 1.0.0 beta\n\n"
B_TRANSLATE_COMMENT("Haiku MIDI Player 1.0.0 beta\n\n"
"This tiny program\n"
"Knows how to play thousands of\n"
"Cheesy sounding songs", "This is a haiku. First line has five syllables, second has seven and last has five again. Create your own."),
+21 -19
View File
@@ -44,7 +44,7 @@
//------------------------------------------------------------------------------
MidiPlayerWindow::MidiPlayerWindow()
: BWindow(BRect(0, 0, 1, 1), TR("MidiPlayer"), B_TITLED_WINDOW,
: BWindow(BRect(0, 0, 1, 1), B_TRANSLATE("MidiPlayer"), B_TITLED_WINDOW,
B_ASYNCHRONOUS_CONTROLS | B_NOT_RESIZABLE | B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS)
{
playing = false;
@@ -193,11 +193,11 @@ void MidiPlayerWindow::CreateInputMenu()
msg->what = MSG_INPUT_CHANGED;
msg->AddInt32("id", -1);
inputOff = new BMenuItem(TR("Off"), msg);
inputOff = new BMenuItem(B_TRANSLATE("Off"), msg);
inputPopUp->AddItem(inputOff);
inputMenu = new BMenuField(TR("Live input:"), inputPopUp, NULL);
inputMenu = new BMenuField(B_TRANSLATE("Live input:"), inputPopUp, NULL);
}
//------------------------------------------------------------------------------
@@ -207,22 +207,22 @@ void MidiPlayerWindow::CreateReverbMenu()
BPopUpMenu* reverbPopUp = new BPopUpMenu("reverbPopUp");
reverbNone = new BMenuItem(
TR("None"), new BMessage(MSG_REVERB_NONE));
B_TRANSLATE("None"), new BMessage(MSG_REVERB_NONE));
reverbCloset = new BMenuItem(
TR("Closet"), new BMessage(MSG_REVERB_CLOSET));
B_TRANSLATE("Closet"), new BMessage(MSG_REVERB_CLOSET));
reverbGarage = new BMenuItem(
TR("Garage"), new BMessage(MSG_REVERB_GARAGE));
B_TRANSLATE("Garage"), new BMessage(MSG_REVERB_GARAGE));
reverbIgor = new BMenuItem(
TR("Igor's lab"), new BMessage(MSG_REVERB_IGOR));
B_TRANSLATE("Igor's lab"), new BMessage(MSG_REVERB_IGOR));
reverbCavern = new BMenuItem(
TR("Cavern"), new BMessage(MSG_REVERB_CAVERN));
B_TRANSLATE("Cavern"), new BMessage(MSG_REVERB_CAVERN));
reverbDungeon = new BMenuItem(
TR("Dungeon"), new BMessage(MSG_REVERB_DUNGEON));
B_TRANSLATE("Dungeon"), new BMessage(MSG_REVERB_DUNGEON));
reverbPopUp->AddItem(reverbNone);
reverbPopUp->AddItem(reverbCloset);
@@ -231,7 +231,7 @@ void MidiPlayerWindow::CreateReverbMenu()
reverbPopUp->AddItem(reverbCavern);
reverbPopUp->AddItem(reverbDungeon);
reverbMenu = new BMenuField(TR("Reverb:"), reverbPopUp, NULL);
reverbMenu = new BMenuField(B_TRANSLATE("Reverb:"), reverbPopUp, NULL);
}
//------------------------------------------------------------------------------
@@ -241,7 +241,7 @@ void MidiPlayerWindow::CreateViews()
// Set up needed views
scopeView = new ScopeView;
showScope = new BCheckBox("showScope", TR("Scope"),
showScope = new BCheckBox("showScope", B_TRANSLATE("Scope"),
new BMessage(MSG_SHOW_SCOPE));
showScope->SetValue(B_CONTROL_ON);
@@ -254,7 +254,8 @@ void MidiPlayerWindow::CreateViews()
volumeSlider->UseFillColor(true, &col);
volumeSlider->SetModificationMessage(new BMessage(MSG_VOLUME));
playButton = new BButton("playButton", TR("Play"), new BMessage(MSG_PLAY_STOP));
playButton = new BButton("playButton", B_TRANSLATE("Play"),
new BMessage(MSG_PLAY_STOP));
playButton->SetEnabled(false);
BBox* divider = new BBox(B_EMPTY_STRING, B_WILL_DRAW | B_FRAME_EVENTS,
@@ -262,7 +263,7 @@ void MidiPlayerWindow::CreateViews()
divider->SetExplicitMaxSize(
BSize(B_SIZE_UNLIMITED, 1));
BStringView* volumeLabel = new BStringView(NULL, TR("Volume:"));
BStringView* volumeLabel = new BStringView(NULL, B_TRANSLATE("Volume:"));
volumeLabel->SetAlignment(B_ALIGN_LEFT);
volumeLabel->SetExplicitMaxSize(BSize(B_SIZE_UNLIMITED, B_SIZE_UNSET));
@@ -386,7 +387,7 @@ void MidiPlayerWindow::LoadFile(entry_ref* ref)
synth.SetVolume(volume / 100.0f);
playButton->SetEnabled(true);
playButton->SetLabel(TR("Stop"));
playButton->SetLabel(B_TRANSLATE("Stop"));
scopeView->SetHaveFile(true);
scopeView->SetPlaying(true);
scopeView->Invalidate();
@@ -396,13 +397,14 @@ void MidiPlayerWindow::LoadFile(entry_ref* ref)
else
{
playButton->SetEnabled(false);
playButton->SetLabel(TR("Play"));
playButton->SetLabel(B_TRANSLATE("Play"));
scopeView->SetHaveFile(false);
scopeView->SetPlaying(false);
scopeView->Invalidate();
(new BAlert(
NULL, TR("Could not load song"), TR("OK"), NULL, NULL,
(new BAlert(NULL,
B_TRANSLATE("Could not load song"),
B_TRANSLATE("OK"), NULL, NULL,
B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go();
}
}
@@ -446,7 +448,7 @@ void MidiPlayerWindow::StopHook()
scopeView->SetPlaying(false);
scopeView->Invalidate();
playButton->SetEnabled(true);
playButton->SetLabel(TR("Play"));
playButton->SetLabel(B_TRANSLATE("Play"));
Unlock();
}
@@ -466,7 +468,7 @@ void MidiPlayerWindow::OnPlayStop()
}
else
{
playButton->SetLabel(TR("Stop"));
playButton->SetLabel(B_TRANSLATE("Stop"));
scopeView->SetPlaying(true);
scopeView->Invalidate();
+1 -1
View File
@@ -186,7 +186,7 @@ void ScopeView::DrawLoading()
void ScopeView::DrawNoFile()
{
DrawText(TR("Drop MIDI file here"));
DrawText(B_TRANSLATE("Drop MIDI file here"));
}
//------------------------------------------------------------------------------