Ticket #5292: midiplayer.diff
File midiplayer.diff, 8.4 KB (added by , 15 years ago) |
---|
-
src/apps/midiplayer/MidiPlayerApp.cpp
21 21 */ 22 22 23 23 #include <Alert.h> 24 #include <Catalog.h> 25 #include <Locale.h> 24 26 #include <StorageKit.h> 25 27 26 28 #include "MidiPlayerApp.h" 27 29 #include "MidiPlayerWindow.h" 28 30 31 #undef TR_CONTEXT 32 #define TR_CONTEXT "Main Application" 29 33 30 34 MidiPlayerApp::MidiPlayerApp() 31 35 : BApplication(MIDI_PLAYER_SIGNATURE) 32 36 { 37 be_locale->GetAppCatalog(&fCatalog); 33 38 window = new MidiPlayerWindow; 34 39 } 35 40 … … 46 51 { 47 52 (new BAlert( 48 53 NULL, 49 "Haiku MIDI Player 1.0.0 beta\n\n"54 TR_CMT("Haiku MIDI Player 1.0.0 beta\n\n" 50 55 "This tiny program\n" 51 56 "Knows how to play thousands of\n" 52 "Cheesy sounding songs", 57 "Cheesy sounding songs", "This is a haiku. First line has five syllables, second has seven and last has five again. Create your own."), 53 58 "Okay", NULL, NULL, 54 59 B_WIDTH_AS_USUAL, B_INFO_ALERT))->Go(); 55 60 } -
src/apps/midiplayer/ScopeView.cpp
20 20 * DEALINGS IN THE SOFTWARE. 21 21 */ 22 22 23 #include <Catalog.h> 24 #include <Locale.h> 23 25 #include <Synth.h> 24 26 #include <Window.h> 25 27 26 28 #include "ScopeView.h" 27 29 30 #undef TR_CONTEXT 31 #define TR_CONTEXT "Scope View" 32 33 28 34 //------------------------------------------------------------------------------ 29 35 30 36 ScopeView::ScopeView() … … 180 186 181 187 void ScopeView::DrawNoFile() 182 188 { 183 DrawText( "Drop MIDI file here");189 DrawText(TR("Drop MIDI file here")); 184 190 } 185 191 186 192 //------------------------------------------------------------------------------ -
src/apps/midiplayer/MidiPlayerApp.h
39 39 40 40 private: 41 41 typedef BApplication super; 42 42 BCatalog fCatalog; 43 43 MidiPlayerWindow* window; 44 44 }; 45 45 -
src/apps/midiplayer/Jamfile
7 7 MidiPlayerWindow.cpp 8 8 ScopeView.cpp 9 9 SynthBridge.cpp 10 : be midi midi2 $(TARGET_LIBSUPC++) 10 : be midi midi2 $(TARGET_LIBSUPC++) liblocale.so 11 11 : MidiPlayer.rdef 12 12 ; 13 13 14 DoCatalogs MidiPlayer : 15 x-vnd.Haiku-MidiPlayer 16 : 17 MidiPlayerApp.cpp 18 MidiPlayerWindow.cpp 19 ScopeView.cpp 20 : en.catalog 21 : eo.catkeys 22 ; -
src/apps/midiplayer/MidiPlayerWindow.cpp
20 20 * DEALINGS IN THE SOFTWARE. 21 21 */ 22 22 23 #include <Catalog.h> 23 24 #include <GridLayoutBuilder.h> 24 25 #include <GroupLayout.h> 25 26 #include <GroupLayoutBuilder.h> 27 #include <Locale.h> 26 28 #include <MidiProducer.h> 27 29 #include <MidiRoster.h> 28 30 #include <StorageKit.h> … … 36 38 #define _W(a) (a->Frame().Width()) 37 39 #define _H(a) (a->Frame().Height()) 38 40 41 #undef TR_CONTEXT 42 #define TR_CONTEXT "Main Window" 43 39 44 //------------------------------------------------------------------------------ 40 45 41 46 MidiPlayerWindow::MidiPlayerWindow() 42 : BWindow(BRect(0, 0, 1, 1), "MidiPlayer", B_TITLED_WINDOW,47 : BWindow(BRect(0, 0, 1, 1), TR("MidiPlayer"), B_TITLED_WINDOW, 43 48 B_ASYNCHRONOUS_CONTROLS | B_NOT_RESIZABLE | B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS) 44 49 { 45 50 playing = false; … … 188 193 msg->what = MSG_INPUT_CHANGED; 189 194 msg->AddInt32("id", -1); 190 195 191 inputOff = new BMenuItem( "Off", msg);196 inputOff = new BMenuItem(TR("Off"), msg); 192 197 193 198 inputPopUp->AddItem(inputOff); 194 199 195 inputMenu = new BMenuField( "Live input:", inputPopUp, NULL);200 inputMenu = new BMenuField(TR("Live input:"), inputPopUp, NULL); 196 201 } 197 202 198 203 //------------------------------------------------------------------------------ … … 202 207 BPopUpMenu* reverbPopUp = new BPopUpMenu("reverbPopUp"); 203 208 204 209 reverbNone = new BMenuItem( 205 "None", new BMessage(MSG_REVERB_NONE));210 TR("None"), new BMessage(MSG_REVERB_NONE)); 206 211 207 212 reverbCloset = new BMenuItem( 208 "Closet", new BMessage(MSG_REVERB_CLOSET));213 TR("Closet"), new BMessage(MSG_REVERB_CLOSET)); 209 214 210 215 reverbGarage = new BMenuItem( 211 "Garage", new BMessage(MSG_REVERB_GARAGE));216 TR("Garage"), new BMessage(MSG_REVERB_GARAGE)); 212 217 213 218 reverbIgor = new BMenuItem( 214 "Igor's lab", new BMessage(MSG_REVERB_IGOR));219 TR("Igor's lab"), new BMessage(MSG_REVERB_IGOR)); 215 220 216 221 reverbCavern = new BMenuItem( 217 "Cavern", new BMessage(MSG_REVERB_CAVERN));222 TR("Cavern"), new BMessage(MSG_REVERB_CAVERN)); 218 223 219 224 reverbDungeon = new BMenuItem( 220 "Dungeon", new BMessage(MSG_REVERB_DUNGEON));225 TR("Dungeon"), new BMessage(MSG_REVERB_DUNGEON)); 221 226 222 227 reverbPopUp->AddItem(reverbNone); 223 228 reverbPopUp->AddItem(reverbCloset); … … 226 231 reverbPopUp->AddItem(reverbCavern); 227 232 reverbPopUp->AddItem(reverbDungeon); 228 233 229 reverbMenu = new BMenuField( "Reverb:", reverbPopUp, NULL);234 reverbMenu = new BMenuField(TR("Reverb:"), reverbPopUp, NULL); 230 235 } 231 236 232 237 //------------------------------------------------------------------------------ … … 236 241 // Set up needed views 237 242 scopeView = new ScopeView; 238 243 239 showScope = new BCheckBox("showScope", "Scope",244 showScope = new BCheckBox("showScope", TR("Scope"), 240 245 new BMessage(MSG_SHOW_SCOPE)); 241 246 showScope->SetValue(B_CONTROL_ON); 242 247 … … 249 254 volumeSlider->UseFillColor(true, &col); 250 255 volumeSlider->SetModificationMessage(new BMessage(MSG_VOLUME)); 251 256 252 playButton = new BButton("playButton", "Play", new BMessage(MSG_PLAY_STOP));257 playButton = new BButton("playButton", TR("Play"), new BMessage(MSG_PLAY_STOP)); 253 258 playButton->SetEnabled(false); 254 259 255 260 BBox* divider = new BBox(B_EMPTY_STRING, B_WILL_DRAW | B_FRAME_EVENTS, … … 257 262 divider->SetExplicitMaxSize( 258 263 BSize(B_SIZE_UNLIMITED, 1)); 259 264 260 BStringView* volumeLabel = new BStringView(NULL, "Volume:");265 BStringView* volumeLabel = new BStringView(NULL, TR("Volume:")); 261 266 volumeLabel->SetAlignment(B_ALIGN_LEFT); 262 267 volumeLabel->SetExplicitMaxSize(BSize(B_SIZE_UNLIMITED, B_SIZE_UNSET)); 263 268 … … 381 386 synth.SetVolume(volume / 100.0f); 382 387 383 388 playButton->SetEnabled(true); 384 playButton->SetLabel( "Stop");389 playButton->SetLabel(TR("Stop")); 385 390 scopeView->SetHaveFile(true); 386 391 scopeView->SetPlaying(true); 387 392 scopeView->Invalidate(); … … 391 396 else 392 397 { 393 398 playButton->SetEnabled(false); 394 playButton->SetLabel( "Play");399 playButton->SetLabel(TR("Play")); 395 400 scopeView->SetHaveFile(false); 396 401 scopeView->SetPlaying(false); 397 402 scopeView->Invalidate(); 398 403 399 404 (new BAlert( 400 NULL, "Could not load song", "OK", NULL, NULL,405 NULL, TR("Could not load song"), TR("OK"), NULL, NULL, 401 406 B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go(); 402 407 } 403 408 } … … 441 446 scopeView->SetPlaying(false); 442 447 scopeView->Invalidate(); 443 448 playButton->SetEnabled(true); 444 playButton->SetLabel( "Play");449 playButton->SetLabel(TR("Play")); 445 450 446 451 Unlock(); 447 452 } … … 461 466 } 462 467 else 463 468 { 464 playButton->SetLabel( "Stop");469 playButton->SetLabel(TR("Stop")); 465 470 scopeView->SetPlaying(true); 466 471 scopeView->Invalidate(); 467 472 -
data/catalogs/apps/midiplayer/eo.catkeys
1 1 esperanto x-vnd.Haiku-MidiPlayer 1406887279 2 None Main Window Neniu 3 Live input: Main Window Viva enigo: 4 Haiku MIDI Player 1.0.0 beta\n\nThis tiny program\nKnows how to play thousands of\nCheesy sounding songs Main Application This is a haiku. First line has five syllables, second has seven and last has five again. Create your own. Haiku MIDI-a Legilo 1.0.0 beta\n\nLa programet' ĉi\nEblas legi milojn da\nRidindaj kantoj 5 Stop Main Window Halti 6 Cavern Main Window Kavo 7 Volume: Main Window Laŭteco: 8 Reverb: Main Window Eĥo: 9 OK Main Window Daŭrigi 10 MidiPlayer Main Window MIDI-a Legilo 11 Off Main Window Malŝaltita 12 Dungeon Main Window Karcero 13 Play Main Window Legi 14 Garage Main Window Aŭtejo 15 Closet Main Window Ĉambreto 16 Drop MIDI file here Scope View Faligu MIDI-an dosieron ĉi tie 17 Igor's lab Main Window La laboratorio de Igoro 18 Scope Main Window Skopo 19 Could not load song Main Window La kanto ne eblis ŝarĝiĝi.