diff options
author | Orcan Ogetbil <oget.fedora@gmail.com> | 2010-12-12 10:30:39 +0000 |
---|---|---|
committer | Orcan Ogetbil <oget.fedora@gmail.com> | 2010-12-12 10:30:39 +0000 |
commit | cf0828dc76ddc11de107bc65ddada38d03404030 (patch) | |
tree | 2c56dd018886f2332330d4c98a46b05a23a3ab14 /muse2/muse | |
parent | a4d6602deb9e55720659df425664c554be6e4a7a (diff) |
Translations are now handled by cmake. Updated the Russian translation. Added -l flag to override system locale.
Diffstat (limited to 'muse2/muse')
36 files changed, 345 insertions, 287 deletions
diff --git a/muse2/muse/CMakeLists.txt b/muse2/muse/CMakeLists.txt index ad607c43..6c184b67 100644 --- a/muse2/muse/CMakeLists.txt +++ b/muse2/muse/CMakeLists.txt @@ -38,23 +38,6 @@ endif (ENABLE_PYTHON) subdirs (${SubDirs}) -#QT4_WRAP_UI (muse_ui_headers -# QT4_WRAP_UI3 (muse_ui_headers -# preferences.ui -# exportmididialog.ui -# configmidifile.ui -# transport.ui -# aboutbox.ui -# transpose.ui -# projectpropsdialog.ui -# projectdialog.ui -# templatedialog.ui -# importmidi.ui -# routedialog.ui -# configtrack.ui -# midiportinfo.ui -# miditrackinfo.ui -# ) QT4_WRAP_CPP ( muse_moc_headers # projectpropsdialog.h @@ -119,12 +102,7 @@ QT4_ADD_RESOURCES (muse_qrc_files muse.qrc ) -add_executable ( muse - ${muse_qrc_files} - ${muse_moc_headers} - # ${muse_ui_headers} - ${PROJECT_BINARY_DIR}/all.h.pch - +file (GLOB SOURCE_FILES # ticksynth.cpp # vst.cpp # dssihost.cpp @@ -281,6 +259,18 @@ add_executable ( muse default_click.h ) +add_executable ( muse + ${muse_qrc_files} + ${muse_moc_headers} + # ${muse_ui_headers} + ${PROJECT_BINARY_DIR}/all.h.pch + ${SOURCE_FILES} + ) + +set (FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${SOURCE_FILES} CACHE INTERNAL "") + +add_dependencies(muse translations) + # AM_CXXFLAGS +=-DSVNVERSION=\"$(shell svnversion)\" # EXEC_PROGRAM( svnversion # ARGS ${PROJECT_SOURCE_DIR} diff --git a/muse2/muse/app.cpp b/muse2/muse/app.cpp index 67adbb23..2d19f2cc 100644 --- a/muse2/muse/app.cpp +++ b/muse2/muse/app.cpp @@ -105,27 +105,28 @@ static pthread_t watchdogThread; //ErrorHandler *error; static const char* fileOpenText = - QT_TR_NOOP("Click this button to open a <em>new song</em>.<br>" + QT_TRANSLATE_NOOP("@default", "Click this button to open a <em>new song</em>.<br>" "You can also select the <b>Open command</b> from the File menu."); static const char* fileSaveText = - QT_TR_NOOP("Click this button to save the song you are " + QT_TRANSLATE_NOOP("@default", "Click this button to save the song you are " "editing. You will be prompted for a file name.\n" "You can also select the Save command from the File menu."); -static const char* fileNewText = QT_TR_NOOP("Create New Song"); - -static const char* infoLoopButton = QT_TR_NOOP("loop between left mark and right mark"); -static const char* infoPunchinButton = QT_TR_NOOP("record starts at left mark"); -static const char* infoPunchoutButton = QT_TR_NOOP("record stops at right mark"); -static const char* infoStartButton = QT_TR_NOOP("rewind to start position"); -static const char* infoRewindButton = QT_TR_NOOP("rewind current position"); -static const char* infoForwardButton = QT_TR_NOOP("move current position"); -static const char* infoStopButton = QT_TR_NOOP("stop sequencer"); -static const char* infoPlayButton = QT_TR_NOOP("start sequencer play"); -static const char* infoRecordButton = QT_TR_NOOP("to record press record and then play"); -static const char* infoPanicButton = QT_TR_NOOP("send note off to all midi channels"); +static const char* fileNewText = QT_TRANSLATE_NOOP("@default", "Create New Song"); + +static const char* infoLoopButton = QT_TRANSLATE_NOOP("@default", "loop between left mark and right mark"); +static const char* infoPunchinButton = QT_TRANSLATE_NOOP("@default", "record starts at left mark"); +static const char* infoPunchoutButton = QT_TRANSLATE_NOOP("@default", "record stops at right mark"); +static const char* infoStartButton = QT_TRANSLATE_NOOP("@default", "rewind to start position"); +static const char* infoRewindButton = QT_TRANSLATE_NOOP("@default", "rewind current position"); +static const char* infoForwardButton = QT_TRANSLATE_NOOP("@default", "move current position"); +static const char* infoStopButton = QT_TRANSLATE_NOOP("@default", "stop sequencer"); +static const char* infoPlayButton = QT_TRANSLATE_NOOP("@default", "start sequencer play"); +static const char* infoRecordButton = QT_TRANSLATE_NOOP("@default", "to record press record and then play"); +static const char* infoPanicButton = QT_TRANSLATE_NOOP("@default", "send note off to all midi channels"); #define PROJECT_LIST_LEN 6 static QString* projectList[PROJECT_LIST_LEN]; +static QString locale_override; extern void initIcons(); extern void initMidiSynth(); @@ -686,7 +687,7 @@ QMenu* populateAddSynth(QWidget* parent) // No MESS sub-menu yet? Create it now. if(!synpMESS) synpMESS = new QMenu(parent); - QAction* sM = synpMESS->addAction(QT_TR_NOOP(s->description()) + " <" + QT_TR_NOOP(s->name()) + ">"); + QAction* sM = synpMESS->addAction(QT_TRANSLATE_NOOP("@default", s->description()) + " <" + QT_TRANSLATE_NOOP("@default", s->name()) + ">"); sM->setData(MENU_ADD_SYNTH_ID_BASE + idx); } } @@ -703,8 +704,8 @@ QMenu* populateAddSynth(QWidget* parent) // No DSSI sub-menu yet? Create it now. if(!synpDSSI) synpDSSI = new QMenu(parent); - //synpDSSI->insertItem(QT_TR_NOOP(s->description()) + " <" + QT_TR_NOOP(s->name()) + ">", MENU_ADD_SYNTH_ID_BASE + idx); - QAction* sD = synpDSSI->addAction(QT_TR_NOOP(s->description()) + " <" + QT_TR_NOOP(s->name()) + ">"); + //synpDSSI->insertItem(QT_TRANSLATE_NOOP("@default", s->description()) + " <" + QT_TRANSLATE_NOOP("@default", s->name()) + ">", MENU_ADD_SYNTH_ID_BASE + idx); + QAction* sD = synpDSSI->addAction(QT_TRANSLATE_NOOP("@default", s->description()) + " <" + QT_TRANSLATE_NOOP("@default", s->name()) + ">"); sD->setData(MENU_ADD_SYNTH_ID_BASE + idx); } } @@ -722,7 +723,7 @@ QMenu* populateAddSynth(QWidget* parent) // No VST sub-menu yet? Create it now. if(!synpVST) synpVST = new QMenu(parent); - QAction* sV = synpVST->addAction(QT_TR_NOOP(s->description()) + " <" + QT_TR_NOOP(s->name()) + ">"); + QAction* sV = synpVST->addAction(QT_TRANSLATE_NOOP("@default", s->description()) + " <" + QT_TRANSLATE_NOOP("@default", s->name()) + ">"); sV->setData(MENU_ADD_SYNTH_ID_BASE + idx); } } @@ -737,15 +738,15 @@ QMenu* populateAddSynth(QWidget* parent) // No Other sub-menu yet? Create it now. if(!synpOther) synpOther = new QMenu(parent); - //synpOther->insertItem(QT_TR_NOOP(s->description()) + " <" + QT_TR_NOOP(s->name()) + ">", MENU_ADD_SYNTH_ID_BASE + idx); - QAction* sO = synpOther->addAction(QT_TR_NOOP(s->description()) + " <" + QT_TR_NOOP(s->name()) + ">"); + //synpOther->insertItem(QT_TRANSLATE_NOOP("@default", s->description()) + " <" + QT_TRANSLATE_NOOP("@default", s->name()) + ">", MENU_ADD_SYNTH_ID_BASE + idx); + QAction* sO = synpOther->addAction(QT_TRANSLATE_NOOP("@default", s->description()) + " <" + QT_TRANSLATE_NOOP("@default", s->name()) + ">"); sO->setData(MENU_ADD_SYNTH_ID_BASE + idx); } if(synpMESS) { synpMESS->setIcon(*synthIcon); - synpMESS->setTitle(QT_TR_NOOP("MESS")); + synpMESS->setTitle(QT_TRANSLATE_NOOP("@default", "MESS")); synp->addMenu(synpMESS); } @@ -753,7 +754,7 @@ QMenu* populateAddSynth(QWidget* parent) if(synpDSSI) { synpDSSI->setIcon(*synthIcon); - synpDSSI->setTitle(QT_TR_NOOP("DSSI")); + synpDSSI->setTitle(QT_TRANSLATE_NOOP("@default", "DSSI")); synp->addMenu(synpDSSI); } #endif @@ -762,7 +763,7 @@ QMenu* populateAddSynth(QWidget* parent) if(synpVST) { synpVST->setIcon(*synthIcon); - synpVST->setTitle(QT_TR_NOOP("FST")); + synpVST->setTitle(QT_TRANSLATE_NOOP("@default", "FST")); synp->addMenu(synpVST); } #endif @@ -787,38 +788,38 @@ QActionGroup* populateAddTrack(QMenu* addTrack) QActionGroup* grp = new QActionGroup(addTrack); QAction* midi = addTrack->addAction(QIcon(*addtrack_addmiditrackIcon), - QT_TR_NOOP("Add Midi Track")); + QT_TRANSLATE_NOOP("@default", "Add Midi Track")); midi->setData(Track::MIDI); grp->addAction(midi); QAction* drum = addTrack->addAction(QIcon(*addtrack_drumtrackIcon), - QT_TR_NOOP("Add Drum Track")); + QT_TRANSLATE_NOOP("@default", "Add Drum Track")); drum->setData(Track::DRUM); grp->addAction(drum); QAction* wave = addTrack->addAction(QIcon(*addtrack_wavetrackIcon), - QT_TR_NOOP("Add Wave Track")); + QT_TRANSLATE_NOOP("@default", "Add Wave Track")); wave->setData(Track::WAVE); grp->addAction(wave); QAction* aoutput = addTrack->addAction(QIcon(*addtrack_audiooutputIcon), - QT_TR_NOOP("Add Audio Output")); + QT_TRANSLATE_NOOP("@default", "Add Audio Output")); aoutput->setData(Track::AUDIO_OUTPUT); grp->addAction(aoutput); QAction* agroup = addTrack->addAction(QIcon(*addtrack_audiogroupIcon), - QT_TR_NOOP("Add Audio Group")); + QT_TRANSLATE_NOOP("@default", "Add Audio Group")); agroup->setData(Track::AUDIO_GROUP); grp->addAction(agroup); QAction* ainput = addTrack->addAction(QIcon(*addtrack_audioinputIcon), - QT_TR_NOOP("Add Audio Input")); + QT_TRANSLATE_NOOP("@default", "Add Audio Input")); ainput->setData(Track::AUDIO_INPUT); grp->addAction(ainput); QAction* aaux = addTrack->addAction(QIcon(*addtrack_auxsendIcon), - QT_TR_NOOP("Add Aux Send")); + QT_TRANSLATE_NOOP("@default", "Add Aux Send")); aaux->setData(Track::AUDIO_AUX); grp->addAction(aaux); // Create a sub-menu and fill it with found synth types. Make addTrack the owner. QMenu* synp = populateAddSynth(addTrack); synp->setIcon(*synthIcon); - synp->setTitle(QT_TR_NOOP("Add Synth")); + synp->setTitle(QT_TRANSLATE_NOOP("@default", "Add Synth")); // Add the sub-menu to the given menu. addTrack->addMenu(synp); @@ -2717,7 +2718,7 @@ PopupMenu* MusE::prepareRoutingPopupMenu(Track* track, bool dst) for(int ch = 0; ch < MIDI_CHANNELS; ++ch) { //QAction* a = m->addAction(QString("Channel %1").arg(ch+1)); - //subp->insertItem(QT_TR_NOOP(QString("Channel %1").arg(ch+1)), i * MIDI_CHANNELS + ch); + //subp->insertItem(QT_TRANSLATE_NOOP("@default", QString("Channel %1").arg(ch+1)), i * MIDI_CHANNELS + ch); gid = i * MIDI_CHANNELS + ch; //printf("MusE::prepareRoutingPopupMenu inserting gid:%d\n", gid); @@ -2977,7 +2978,7 @@ PopupView* MusE::prepareRoutingPopupView(Track* track, bool dst) //QMenu* m = menu->addMenu(track->name()); //QPopupMenu* subp = new QPopupMenu(parent); //PopupMenu* subp = new PopupMenu(this); - QStandardItem* subp = new QStandardItem(QT_TR_NOOP(md->name())); + QStandardItem* subp = new QStandardItem(QT_TRANSLATE_NOOP("@default", md->name())); /// connect(subp, SIGNAL(activated(int)), pup, SIGNAL(activated(int))); //connect(subp, SIGNAL(aboutToHide()), pup, SIGNAL(aboutToHide())); @@ -2997,7 +2998,7 @@ PopupView* MusE::prepareRoutingPopupView(Track* track, bool dst) for(int ch = 0; ch < MIDI_CHANNELS; ++ch) { //QAction* a = m->addAction(QString("Channel %1").arg(ch+1)); - //subp->insertItem(QT_TR_NOOP(QString("Channel %1").arg(ch+1)), i * MIDI_CHANNELS + ch); + //subp->insertItem(QT_TRANSLATE_NOOP("@default", QString("Channel %1").arg(ch+1)), i * MIDI_CHANNELS + ch); gid = i * MIDI_CHANNELS + ch; //printf("MusE::prepareRoutingPopupMenu inserting gid:%d\n", gid); @@ -3046,7 +3047,7 @@ PopupView* MusE::prepareRoutingPopupView(Track* track, bool dst) Route togRoute(i, (1 << MIDI_CHANNELS) - 1); // Set all channel bits. gRoutingMenuMap.insert( pRouteMenuMap(gid, togRoute) ); -/// pup->insertItem(QT_TR_NOOP(md->name()), subp); +/// pup->insertItem(QT_TRANSLATE_NOOP("@default", md->name()), subp); pup->model()->appendRow(subp); pup->updateView(); } @@ -3620,6 +3621,7 @@ static void usage(const char* prog, const char* txt) #ifdef HAVE_LASH fprintf(stderr, " -L don't use LASH\n"); #endif + fprintf(stderr, " -l xx force locale given by language/country code (de, sv_SE, ...)"); fprintf(stderr, "useful environment variables:\n"); fprintf(stderr, " MUSE override library and shared directories location\n"); fprintf(stderr, " MUSEHOME override user home directory (HOME/)\n"); @@ -3744,7 +3746,7 @@ int main(int argc, char* argv[]) int i; - QString optstr("ahvdDmMsP:Y:py"); + QString optstr("ahvdDmMsP:Y:l:py"); #ifdef VST_SUPPORT optstr += QString("V"); #endif @@ -3783,6 +3785,7 @@ int main(int argc, char* argv[]) case 'I': loadDSSI = false; break; case 'L': useLASH = false; break; case 'y': usePythonBridge = true; break; + case 'l': locale_override = QString(optarg); break; case 'h': usage(argv[0], argv[1]); return -1; default: usage(argv[0], "bad argument"); return -1; } @@ -3871,9 +3874,11 @@ int main(int argc, char* argv[]) static QTranslator translator(0); QString locale(QApplication::keyboardInputLocale().name()); + if (locale_override.length()) + locale = locale_override; if (locale != "C") { QString loc("muse_"); - loc += QString(QApplication::keyboardInputLocale().name()); + loc += locale; if (translator.load(loc, QString(".")) == false) { QString lp(museGlobalShare); lp += QString("/locale"); diff --git a/muse2/muse/arranger/CMakeLists.txt b/muse2/muse/arranger/CMakeLists.txt index 5f886e39..47241207 100644 --- a/muse2/muse/arranger/CMakeLists.txt +++ b/muse2/muse/arranger/CMakeLists.txt @@ -25,21 +25,22 @@ QT4_WRAP_CPP (arranger_mocs alayout.h ) -#QT4_WRAP_UI (arranger_ui_headers -# QT4_WRAP_UI3 (arranger_ui_headers -# ) - -add_library ( arranger STATIC +file (GLOB SOURCE_FILES arranger.cpp arranger.h pcanvas.cpp pcanvas.h tlist.cpp tlist.h alayout.cpp alayout.h trackinfo.cpp trackautomationview.h - + ) + +add_library ( arranger STATIC + ${SOURCE_FILES} ${arranger_mocs} # ${arranger_ui_headers} ) +set (FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${SOURCE_FILES} CACHE INTERNAL "") + add_dependencies(arranger mixer) set_target_properties( arranger diff --git a/muse2/muse/arranger/arranger.cpp b/muse2/muse/arranger/arranger.cpp index 7c9c5751..c9e9a8db 100644 --- a/muse2/muse/arranger/arranger.cpp +++ b/muse2/muse/arranger/arranger.cpp @@ -122,7 +122,7 @@ Arranger::Arranger(QMainWindow* parent, const char* name) toolbar->addWidget(cursorPos); const char* rastval[] = { - QT_TR_NOOP("Off"), QT_TR_NOOP("Bar"), "1/2", "1/4", "1/8", "1/16" + QT_TRANSLATE_NOOP("@default", "Off"), QT_TRANSLATE_NOOP("@default", "Bar"), "1/2", "1/4", "1/8", "1/16" }; label = new QLabel(tr("Snap")); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); diff --git a/muse2/muse/arranger/tlist.cpp b/muse2/muse/arranger/tlist.cpp index c49607f7..da4ad9ce 100644 --- a/muse2/muse/arranger/tlist.cpp +++ b/muse2/muse/arranger/tlist.cpp @@ -809,7 +809,7 @@ void TList::mousePressEvent(QMouseEvent* ev) // Create a sub-menu and fill it with found synth types. Make p the owner. QMenu* synp = populateAddSynth(p); synp->setIcon(*synthIcon); - synp->setTitle(QT_TR_NOOP("Add Synth")); + synp->setTitle(QT_TRANSLATE_NOOP("@default", "Add Synth")); // Add the 'Add Synth' sub-menu to the menu. p->addMenu(synp); diff --git a/muse2/muse/cliplist/CMakeLists.txt b/muse2/muse/cliplist/CMakeLists.txt index e9164fb7..212a0072 100644 --- a/muse2/muse/cliplist/CMakeLists.txt +++ b/muse2/muse/cliplist/CMakeLists.txt @@ -22,16 +22,19 @@ QT4_WRAP_CPP (cliplist_mocs cliplist.h ) -#QT4_WRAP_UI (cliplist_ui_headers -# QT4_WRAP_UI3 (cliplist_ui_headers -# ) - -add_library ( cliplist STATIC +file (GLOB SOURCE_FILES cliplist.cpp cliplist.h + ) + +add_library ( cliplist STATIC + ${SOURCE_FILES} ${cliplist_mocs} # ${cliplist_ui_headers} ) + +set (FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${SOURCE_FILES} CACHE INTERNAL "") + set_target_properties( cliplist PROPERTIES COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all.h" ) diff --git a/muse2/muse/confmport.cpp b/muse2/muse/confmport.cpp index b95db28d..69cbccdd 100644 --- a/muse2/muse/confmport.cpp +++ b/muse2/muse/confmport.cpp @@ -410,11 +410,11 @@ void MPConfig::rbClicked(QTableWidgetItem* item) QAction* act; // Could do it this way... - //act = pup->addAction(tr("Create") + QT_TR_NOOP(" Jack") + tr(" input")); - //act = pup->addAction(tr("Create") + QT_TR_NOOP(" Jack") + tr(" output")); - //act = pup->addAction(tr("Create") + QT_TR_NOOP(" Jack") + tr(" combo")); + //act = pup->addAction(tr("Create") + QT_TRANSLATE_NOOP("@default", " Jack") + tr(" input")); + //act = pup->addAction(tr("Create") + QT_TRANSLATE_NOOP("@default", " Jack") + tr(" output")); + //act = pup->addAction(tr("Create") + QT_TRANSLATE_NOOP("@default", " Jack") + tr(" combo")); // ... or keep it simple and let the user click on the green lights instead. - act = pup->addAction(tr("Create") + QT_TR_NOOP(" Jack") + tr(" device")); + act = pup->addAction(tr("Create") + QT_TRANSLATE_NOOP("@default", " Jack") + tr(" device")); act->setData(0); typedef std::map<std::string, int > asmap; @@ -460,7 +460,7 @@ void MPConfig::rbClicked(QTableWidgetItem* item) //if(!mapALSA.empty()) { pup->addSeparator(); - pup->addAction(new MenuTitleItem(QT_TR_NOOP("ALSA:"), pup)); + pup->addAction(new MenuTitleItem(QT_TRANSLATE_NOOP("@default", "ALSA:"), pup)); for(imap i = mapALSA.begin(); i != mapALSA.end(); ++i) { @@ -475,7 +475,7 @@ void MPConfig::rbClicked(QTableWidgetItem* item) if(md->deviceType() != MidiDevice::ALSA_MIDI) continue; - act = pup->addAction(QT_TR_NOOP(md->name())); + act = pup->addAction(QT_TRANSLATE_NOOP("@default", md->name())); act->setData(idx); act->setCheckable(true); act->setChecked(md == dev); @@ -486,7 +486,7 @@ void MPConfig::rbClicked(QTableWidgetItem* item) if(!mapSYNTH.empty()) { pup->addSeparator(); - pup->addAction(new MenuTitleItem(QT_TR_NOOP("SYNTH:"), pup)); + pup->addAction(new MenuTitleItem(QT_TRANSLATE_NOOP("@default", "SYNTH:"), pup)); for(imap i = mapSYNTH.begin(); i != mapSYNTH.end(); ++i) { @@ -501,7 +501,7 @@ void MPConfig::rbClicked(QTableWidgetItem* item) if(md->deviceType() != MidiDevice::SYNTH_MIDI) continue; - act = pup->addAction(QT_TR_NOOP(md->name())); + act = pup->addAction(QT_TRANSLATE_NOOP("@default", md->name())); act->setData(idx); act->setCheckable(true); act->setChecked(md == dev); @@ -512,7 +512,7 @@ void MPConfig::rbClicked(QTableWidgetItem* item) //if(!mapJACK.empty()) { pup->addSeparator(); - pup->addAction(new MenuTitleItem(QT_TR_NOOP("JACK:"), pup)); + pup->addAction(new MenuTitleItem(QT_TRANSLATE_NOOP("@default", "JACK:"), pup)); for(imap i = mapJACK.begin(); i != mapJACK.end(); ++i) { @@ -527,7 +527,7 @@ void MPConfig::rbClicked(QTableWidgetItem* item) if(md->deviceType() != MidiDevice::JACK_MIDI) continue; - act = pup->addAction(QT_TR_NOOP(md->name())); + act = pup->addAction(QT_TRANSLATE_NOOP("@default", md->name())); act->setData(idx); act->setCheckable(true); act->setChecked(md == dev); diff --git a/muse2/muse/ctrl/CMakeLists.txt b/muse2/muse/ctrl/CMakeLists.txt index 5fa086d6..c8f7bdff 100644 --- a/muse2/muse/ctrl/CMakeLists.txt +++ b/muse2/muse/ctrl/CMakeLists.txt @@ -29,12 +29,11 @@ QT4_WRAP_CPP (ctrl_mocs ctrlpanel.h ) -#QT4_WRAP_UI (ctrl_ui_headers -# QT4_WRAP_UI3 (ctrl_ui_headers -# configmidictrl.ui -# definemidictrl.ui -# ctrldialog.ui -# ) +file (GLOB SOURCE_FILES + ctrledit.cpp ctrledit.h + ctrlcanvas.cpp ctrlcanvas.h + ctrlpanel.cpp ctrlpanel.h + ) add_library ( ctrl STATIC # configmidictrl.cpp @@ -43,12 +42,13 @@ add_library ( ctrl STATIC # ctrleditor.cpp # ctrledit.cpp - ctrledit.cpp ctrledit.h - ctrlcanvas.cpp ctrlcanvas.h - ctrlpanel.cpp ctrlpanel.h + ${SOURCE_FILES} ${ctrl_mocs} # ${ctrl_ui_headers} ) + +set (FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${SOURCE_FILES} CACHE INTERNAL "") + set_target_properties( ctrl PROPERTIES COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all.h" ) diff --git a/muse2/muse/driver/CMakeLists.txt b/muse2/muse/driver/CMakeLists.txt index 2bdc1b97..8d561ee5 100644 --- a/muse2/muse/driver/CMakeLists.txt +++ b/muse2/muse/driver/CMakeLists.txt @@ -18,12 +18,19 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #============================================================================= -add_library ( driver STATIC +file (GLOB SOURCE_FILES audiodev.h alsamidi.cpp alsamidi.h jack.cpp jackaudio.h dummyaudio.cpp alsatimer.cpp alsatimer.h timerdev.h rtctimer.cpp rtctimer.h jackmidi.cpp jackmidi.h + ) + +add_library ( driver STATIC # ${PROJECT_BINARY_DIR}/all.h.pch - ) + ${SOURCE_FILES} + ) + +set (FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${SOURCE_FILES} CACHE INTERNAL "") + set_target_properties( driver PROPERTIES COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all.h" ) diff --git a/muse2/muse/driver/alsamidi.cpp b/muse2/muse/driver/alsamidi.cpp index dd72ac4a..c7ae07b5 100644 --- a/muse2/muse/driver/alsamidi.cpp +++ b/muse2/muse/driver/alsamidi.cpp @@ -222,9 +222,9 @@ void MidiAlsaDevice::writeRouting(int level, Xml& xml) const { //xml.tag(level++, "Route"); - s = QT_TR_NOOP("Route"); + s = QT_TRANSLATE_NOOP("@default", "Route"); if(r->channel != -1) - s += QString(QT_TR_NOOP(" channel=\"%1\"")).arg(r->channel); + s += QString(QT_TRANSLATE_NOOP("@default", " channel=\"%1\"")).arg(r->channel); xml.tag(level++, s.toLatin1().constData()); /* @@ -258,14 +258,14 @@ void MidiAlsaDevice::writeRouting(int level, Xml& xml) const } */ - s = QT_TR_NOOP("dest"); + s = QT_TRANSLATE_NOOP("@default", "dest"); if(r->type == Route::MIDI_DEVICE_ROUTE) - s += QString(QT_TR_NOOP(" devtype=\"%1\"")).arg(r->device->deviceType()); + s += QString(QT_TRANSLATE_NOOP("@default", " devtype=\"%1\"")).arg(r->device->deviceType()); else if(r->type != Route::TRACK_ROUTE) - s += QString(QT_TR_NOOP(" type=\"%1\"")).arg(r->type); - //s += QString(QT_TR_NOOP(" name=\"%1\"/")).arg(r->name()); - s += QString(QT_TR_NOOP(" name=\"%1\"/")).arg(Xml::xmlString(r->name())); + s += QString(QT_TRANSLATE_NOOP("@default", " type=\"%1\"")).arg(r->type); + //s += QString(QT_TRANSLATE_NOOP("@default", " name=\"%1\"/")).arg(r->name()); + s += QString(QT_TRANSLATE_NOOP("@default", " name=\"%1\"/")).arg(Xml::xmlString(r->name())); xml.tag(level, s.toLatin1().constData()); xml.etag(level--, "Route"); diff --git a/muse2/muse/driver/jackmidi.cpp b/muse2/muse/driver/jackmidi.cpp index c310462d..2d77af2f 100644 --- a/muse2/muse/driver/jackmidi.cpp +++ b/muse2/muse/driver/jackmidi.cpp @@ -707,12 +707,12 @@ void MidiJackDevice::writeRouting(int level, Xml& xml) const //xml.strTag(level, "srcNode", r->name()); //xml.tag(level, "source type=\"%d\" name=\"%s\"/", r->type, r->name().toLatin1().constData()); - s = QT_TR_NOOP("source"); + s = QT_TRANSLATE_NOOP("@default", "source"); if(r->type != Route::TRACK_ROUTE) - s += QString(QT_TR_NOOP(" type=\"%1\"")).arg(r->type); + s += QString(QT_TRANSLATE_NOOP("@default", " type=\"%1\"")).arg(r->type); - //s += QString(QT_TR_NOOP(" name=\"%1\"/")).arg(r->name()); - s += QString(QT_TR_NOOP(" name=\"%1\"/")).arg(Xml::xmlString(r->name())); + //s += QString(QT_TRANSLATE_NOOP("@default", " name=\"%1\"/")).arg(r->name()); + s += QString(QT_TRANSLATE_NOOP("@default", " name=\"%1\"/")).arg(Xml::xmlString(r->name())); xml.tag(level, s.toLatin1().constData()); //xml.strTag(level, "dstNode", name()); @@ -730,9 +730,9 @@ void MidiJackDevice::writeRouting(int level, Xml& xml) const { if(!r->name().isEmpty()) { - s = QT_TR_NOOP("Route"); + s = QT_TRANSLATE_NOOP("@default", "Route"); if(r->channel != -1) - s += QString(QT_TR_NOOP(" channel=\"%1\"")).arg(r->channel); + s += QString(QT_TRANSLATE_NOOP("@default", " channel=\"%1\"")).arg(r->channel); //xml.tag(level++, "Route"); xml.tag(level++, s.toLatin1().constData()); @@ -768,15 +768,15 @@ void MidiJackDevice::writeRouting(int level, Xml& xml) const } */ - s = QT_TR_NOOP("dest"); + s = QT_TRANSLATE_NOOP("@default", "dest"); if(r->type == Route::MIDI_DEVICE_ROUTE) - s += QString(QT_TR_NOOP(" devtype=\"%1\"")).arg(r->device->deviceType()); + s += QString(QT_TRANSLATE_NOOP("@default", " devtype=\"%1\"")).arg(r->device->deviceType()); else if(r->type != Route::TRACK_ROUTE) - s += QString(QT_TR_NOOP(" type=\"%1\"")).arg(r->type); + s += QString(QT_TRANSLATE_NOOP("@default", " type=\"%1\"")).arg(r->type); - //s += QString(QT_TR_NOOP(" name=\"%1\"/")).arg(r->name()); - s += QString(QT_TR_NOOP(" name=\"%1\"/")).arg(Xml::xmlString(r->name())); + //s += QString(QT_TRANSLATE_NOOP("@default", " name=\"%1\"/")).arg(r->name()); + s += QString(QT_TRANSLATE_NOOP("@default", " name=\"%1\"/")).arg(Xml::xmlString(r->name())); xml.tag(level, s.toLatin1().constData()); diff --git a/muse2/muse/globals.cpp b/muse2/muse/globals.cpp index d87020b6..ccd7682a 100644 --- a/muse2/muse/globals.cpp +++ b/muse2/muse/globals.cpp @@ -98,15 +98,15 @@ bool useLASH = true; /* const char* midi_file_pattern[] = { - QT_TR_NOOP("Midi/Kar (*.mid *.MID *.kar *.KAR *.mid.gz *.mid.bz2)"), - QT_TR_NOOP("Midi (*.mid *.MID *.mid.gz *.mid.bz2)"), - QT_TR_NOOP("Karaoke (*.kar *.KAR *.kar.gz *.kar.bz2)"), - QT_TR_NOOP("All Files (*)"), + QT_TRANSLATE_NOOP("@default", "Midi/Kar (*.mid *.MID *.kar *.KAR *.mid.gz *.mid.bz2)"), + QT_TRANSLATE_NOOP("@default", "Midi (*.mid *.MID *.mid.gz *.mid.bz2)"), + QT_TRANSLATE_NOOP("@default", "Karaoke (*.kar *.KAR *.kar.gz *.kar.bz2)"), + QT_TRANSLATE_NOOP("@default", "All Files (*)"), 0 }; */ const QStringList midi_file_pattern = - QT_TR_NOOP( + QT_TRANSLATE_NOOP("@default", QString("Midi/Kar (*.mid *.MID *.kar *.KAR *.mid.gz *.mid.bz2);;") + QString("Midi (*.mid *.MID *.mid.gz *.mid.bz2);;") + QString("Karaoke (*.kar *.KAR *.kar.gz *.kar.bz2);;") + @@ -129,7 +129,7 @@ const char* midi_file_save_pattern[] = { 0 }; QStringList midi_file_save_pattern = - QStringList::split(";;", QT_TR_NOOP( + QStringList::split(";;", QT_TRANSLATE_NOOP("@default", QString("Midi (*.mid);;") + QString("gzip compressed Midi (*.mid.gz);;") + QString("bzip2 compressed Midi (*.mid.bz2);;") + @@ -140,44 +140,44 @@ QStringList midi_file_save_pattern = */ /* const char* midi_file_save_pattern[] = { - QT_TR_NOOP("Midi (*.mid)"), - QT_TR_NOOP("Karaoke (*.kar)"), - QT_TR_NOOP("All Files (*)"), + QT_TRANSLATE_NOOP("@default", "Midi (*.mid)"), + QT_TRANSLATE_NOOP("@default", "Karaoke (*.kar)"), + QT_TRANSLATE_NOOP("@default", "All Files (*)"), 0 }; */ const QStringList midi_file_save_pattern = - QT_TR_NOOP( + QT_TRANSLATE_NOOP("@default", QString("Midi (*.mid);;") + QString("Karaoke (*.kar);;") + QString("All Files (*)")).split(";;"); /* const char* med_file_pattern[] = { - QT_TR_NOOP("med Files (*.med *.med.gz *.med.bz2)"), - QT_TR_NOOP("Uncompressed med Files (*.med)"), - QT_TR_NOOP("gzip compressed med Files (*.med.gz)"), - QT_TR_NOOP("bzip2 compressed med Files (*.med.bz2)"), - QT_TR_NOOP("All Files (*)"), + QT_TRANSLATE_NOOP("@default", "med Files (*.med *.med.gz *.med.bz2)"), + QT_TRANSLATE_NOOP("@default", "Uncompressed med Files (*.med)"), + QT_TRANSLATE_NOOP("@default", "gzip compressed med Files (*.med.gz)"), + QT_TRANSLATE_NOOP("@default", "bzip2 compressed med Files (*.med.bz2)"), + QT_TRANSLATE_NOOP("@default", "All Files (*)"), 0 }; const char* med_file_save_pattern[] = { - QT_TR_NOOP("Uncompressed med Files (*.med)"), - QT_TR_NOOP("gzip compressed med Files (*.med.gz)"), - QT_TR_NOOP("bzip2 compressed med Files (*.med.bz2)"), - QT_TR_NOOP("All Files (*)"), + QT_TRANSLATE_NOOP("@default", "Uncompressed med Files (*.med)"), + QT_TRANSLATE_NOOP("@default", "gzip compressed med Files (*.med.gz)"), + QT_TRANSLATE_NOOP("@default", "bzip2 compressed med Files (*.med.bz2)"), + QT_TRANSLATE_NOOP("@default", "All Files (*)"), 0 }; */ const QStringList med_file_pattern = - QT_TR_NOOP( + QT_TRANSLATE_NOOP("@default", QString("med Files (*.med *.med.gz *.med.bz2);;") + QString("Uncompressed med Files (*.med);;") + QString("gzip compressed med Files (*.med.gz);;") + QString("bzip2 compressed med Files (*.med.bz2);;") + QString("All Files (*)")).split(";;"); const QStringList med_file_save_pattern = - QT_TR_NOOP( + QT_TRANSLATE_NOOP("@default", QString("Uncompressed med Files (*.med);;") + QString("gzip compressed med Files (*.med.gz);;") + QString("bzip2 compressed med Files (*.med.bz2);;") + @@ -185,16 +185,16 @@ const QStringList med_file_save_pattern = /* const char* image_file_pattern[] = { - QT_TR_NOOP("(*.jpg *.gif *.png)"), - QT_TR_NOOP("(*.jpg)"), - QT_TR_NOOP("(*.gif)"), - QT_TR_NOOP("(*.png)"), - QT_TR_NOOP("All Files (*)"), + QT_TRANSLATE_NOOP("@default", "(*.jpg *.gif *.png)"), + QT_TRANSLATE_NOOP("@default", "(*.jpg)"), + QT_TRANSLATE_NOOP("@default", "(*.gif)"), + QT_TRANSLATE_NOOP("@default", "(*.png)"), + QT_TRANSLATE_NOOP("@default", "All Files (*)"), 0 }; */ const QStringList image_file_pattern = - QT_TR_NOOP( + QT_TRANSLATE_NOOP("@default", QString("(*.jpg *.gif *.png);;") + QString("(*.jpg);;") + QString("(*.gif);;") + @@ -212,26 +212,26 @@ const char* ctrl_file_pattern[] = { /* const char* part_file_pattern[] = { - //QT_TR_NOOP("part Files (*.mpt)"), - QT_TR_NOOP("part Files (*.mpt *.mpt.gz *.mpt.bz2)"), - QT_TR_NOOP("All Files (*)"), + //QT_TRANSLATE_NOOP("@default", "part Files (*.mpt)"), + QT_TRANSLATE_NOOP("@default", "part Files (*.mpt *.mpt.gz *.mpt.bz2)"), + QT_TRANSLATE_NOOP("@default", "All Files (*)"), 0 }; const char* part_file_save_pattern[] = { - QT_TR_NOOP("part Files (*.mpt)"), - QT_TR_NOOP("gzip compressed part Files (*.mpt.gz)"), - QT_TR_NOOP("bzip2 compressed part Files (*.mpt.bz2)"), - QT_TR_NOOP("All Files (*)"), + QT_TRANSLATE_NOOP("@default", "part Files (*.mpt)"), + QT_TRANSLATE_NOOP("@default", "gzip compressed part Files (*.mpt.gz)"), + QT_TRANSLATE_NOOP("@default", "bzip2 compressed part Files (*.mpt.bz2)"), + QT_TRANSLATE_NOOP("@default", "All Files (*)"), 0 }; */ const QStringList part_file_pattern = - QT_TR_NOOP( + QT_TRANSLATE_NOOP("@default", QString("part Files (*.mpt *.mpt.gz *.mpt.bz2);;") + QString("All Files (*)")).split(";;"); const QStringList part_file_save_pattern = - QT_TR_NOOP( + QT_TRANSLATE_NOOP("@default", QString("part Files (*.mpt);;") + QString("gzip compressed part Files (*.mpt.gz);;") + QString("bzip2 compressed part Files (*.mpt.bz2);;") + @@ -239,51 +239,51 @@ const QStringList part_file_save_pattern = /* const char* plug_file_pattern[] = { - QT_TR_NOOP("part Files (*.pre)"), - QT_TR_NOOP("All Files (*)"), + QT_TRANSLATE_NOOP("@default", "part Files (*.pre)"), + QT_TRANSLATE_NOOP("@default", "All Files (*)"), 0 }; */ /* const char* preset_file_pattern[] = { - QT_TR_NOOP("Presets (*.pre *.pre.gz *.pre.bz2)"), - QT_TR_NOOP("All Files (*)"), + QT_TRANSLATE_NOOP("@default", "Presets (*.pre *.pre.gz *.pre.bz2)"), + QT_TRANSLATE_NOOP("@default", "All Files (*)"), 0 }; const char* preset_file_save_pattern[] = { - QT_TR_NOOP("Presets (*.pre)"), - QT_TR_NOOP("gzip compressed presets (*.pre.gz)"), - QT_TR_NOOP("bzip2 compressed presets (*.pre.bz2)"), - QT_TR_NOOP("All Files (*)"), + QT_TRANSLATE_NOOP("@default", "Presets (*.pre)"), + QT_TRANSLATE_NOOP("@default", "gzip compressed presets (*.pre.gz)"), + QT_TRANSLATE_NOOP("@default", "bzip2 compressed presets (*.pre.bz2)"), + QT_TRANSLATE_NOOP("@default", "All Files (*)"), 0 }; */ const QStringList preset_file_pattern = - QT_TR_NOOP( + QT_TRANSLATE_NOOP("@default", QString("Presets (*.pre *.pre.gz *.pre.bz2);;") + QString("All Files (*)")).split(";;"); const QStringList preset_file_save_pattern = - QT_TR_NOOP( + QT_TRANSLATE_NOOP("@default", QString("Presets (*.pre);;") + QString("gzip compressed presets (*.pre.gz);;") + QString("bzip2 compressed presets (*.pre.bz2);;") + QString("All Files (*)")).split(";;"); const QStringList drum_map_file_pattern = - QT_TR_NOOP( + QT_TRANSLATE_NOOP("@default", QString("Presets (*.map *.map.gz *.map.bz2);;") + QString("All Files (*)")).split(";;"); const QStringList drum_map_file_save_pattern = - QT_TR_NOOP( + QT_TRANSLATE_NOOP("@default", QString("Presets (*.map);;") + QString("gzip compressed presets (*.map.gz);;") + QString("bzip2 compressed presets (*.map.bz2);;") + QString("All Files (*)")).split(";;"); const QStringList audio_file_pattern = - QT_TR_NOOP( + QT_TRANSLATE_NOOP("@default", QString("Wave/Binary (*.wav *.ogg *.bin);;") + QString("Wave (*.wav *.ogg);;") + QString("Binary (*.bin);;") + diff --git a/muse2/muse/instruments/CMakeLists.txt b/muse2/muse/instruments/CMakeLists.txt index 9e658928..8cc5e6b8 100644 --- a/muse2/muse/instruments/CMakeLists.txt +++ b/muse2/muse/instruments/CMakeLists.txt @@ -23,21 +23,31 @@ QT4_WRAP_CPP ( instruments_mocs editinstrument.h ) -QT4_WRAP_UI ( instruments_ui_headers +file (GLOB UI_FILES editinstrumentbase.ui ) +QT4_WRAP_UI ( instruments_ui_headers + ${UI_FILES} + ) + # Note that ccontrollerbase.ui is not built. It needs to be converted to Qt4 for revival. -add_library ( instruments STATIC +file (GLOB SOURCE_FILES minstrument.cpp editinstrument.cpp minstrument.h editinstrument.h + ) + +add_library ( instruments STATIC + ${SOURCE_FILES} ${instruments_mocs} ${instruments_ui_headers} ) +set (FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${SOURCE_FILES} ${UI_FILES} CACHE INTERNAL "") + set_target_properties( instruments PROPERTIES COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all.h" ) diff --git a/muse2/muse/liste/CMakeLists.txt b/muse2/muse/liste/CMakeLists.txt index d0c13a2d..e3a30797 100644 --- a/muse2/muse/liste/CMakeLists.txt +++ b/muse2/muse/liste/CMakeLists.txt @@ -29,17 +29,15 @@ QT4_WRAP_CPP ( liste_mocs editevent.h ) -QT4_WRAP_UI ( UIC +file (GLOB UI_FILES editctrlbase.ui ) -#QT4_WRAP_UI3 ( liste_ui_headers -# ctrllistedit.ui -# partlistedit.ui -# tracklistedit.ui -# ) +QT4_WRAP_UI ( UIC + ${UI_FILES} + ) -add_library ( liste STATIC +file (GLOB SOURCE_FILES # listedit.cpp listedit.h # ctrllistedit.cpp ctrllistedit.h # partlistedit.cpp partlistedit.h @@ -47,11 +45,17 @@ add_library ( liste STATIC # ieventdialog.cpp ieventdialog.h listedit.cpp listedit.h editevent.cpp editevent.h + ) + +add_library ( liste STATIC + ${SOURCE_FILES} ${liste_mocs} ${liste_ui_headers} ${UIC} ) +set (FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${SOURCE_FILES} ${UI_FILES} CACHE INTERNAL "") + add_dependencies(liste widgets) set_target_properties( liste diff --git a/muse2/muse/marker/CMakeLists.txt b/muse2/muse/marker/CMakeLists.txt index 6155d055..b2b5084f 100644 --- a/muse2/muse/marker/CMakeLists.txt +++ b/muse2/muse/marker/CMakeLists.txt @@ -49,17 +49,19 @@ QT4_WRAP_CPP ( marker_mocs markerview.h ) -# QT4_WRAP_UI ( marker_ui_headers -# QT4_WRAP_UI3 ( marker_ui_headers -# ) +file (GLOB SOURCE_FILES + marker.cpp marker.h + markerview.cpp # markerview.h + ) add_library ( marker STATIC + ${SOURCE_FILES} # ${marker_ui_headers} ${marker_mocs} - marker.cpp marker.h - markerview.cpp # markerview.h ) +set (FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${SOURCE_FILES} CACHE INTERNAL "") + set_target_properties( marker PROPERTIES COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all.h" ) diff --git a/muse2/muse/master/CMakeLists.txt b/muse2/muse/master/CMakeLists.txt index 0a3a54de..168d13ab 100644 --- a/muse2/muse/master/CMakeLists.txt +++ b/muse2/muse/master/CMakeLists.txt @@ -47,19 +47,22 @@ QT4_WRAP_CPP ( master_mocs tscale.h ) -# QT4_WRAP_UI ( master_ui_headers -# QT4_WRAP_UI3 ( master_ui_headers -# ) -add_library ( master STATIC - # ${master_ui_headers} - ${master_mocs} +file (GLOB SOURCE_FILES lmaster.cpp # lmaster.h masteredit.cpp # masteredit.h master.cpp # master.h tscale.cpp # tscale.h + ) + +add_library ( master STATIC + ${SOURCE_FILES} + # ${master_ui_headers} + ${master_mocs} ) +set (FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${SOURCE_FILES} CACHE INTERNAL "") + set_target_properties( master PROPERTIES COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all.h" ) diff --git a/muse2/muse/master/masteredit.cpp b/muse2/muse/master/masteredit.cpp index 4ed76c22..42dc412f 100644 --- a/muse2/muse/master/masteredit.cpp +++ b/muse2/muse/master/masteredit.cpp @@ -119,7 +119,7 @@ MasterEdit::MasterEdit() info->addWidget(tempo); const char* rastval[] = { - QT_TR_NOOP("Off"), "Bar", "1/2", "1/4", "1/8", "1/16" + QT_TRANSLATE_NOOP("@default", "Off"), "Bar", "1/2", "1/4", "1/8", "1/16" }; rasterLabel = new LabelCombo(tr("Snap"), 0); rasterLabel->setFocusPolicy(Qt::NoFocus); diff --git a/muse2/muse/midictrl.cpp b/muse2/muse/midictrl.cpp index 570e3bf9..47d651f8 100644 --- a/muse2/muse/midictrl.cpp +++ b/muse2/muse/midictrl.cpp @@ -155,7 +155,7 @@ QString midiCtrlName(int ctrl) //--------------------------------------------------------- MidiController::MidiController() - : _name(QString(QT_TR_NOOP("Velocity"))) + : _name(QString(QT_TRANSLATE_NOOP("@default", "Velocity"))) { _num = CTRL_VELOCITY; _minVal = 0; diff --git a/muse2/muse/midiedit/CMakeLists.txt b/muse2/muse/midiedit/CMakeLists.txt index 37fa6073..5fa2d5f9 100644 --- a/muse2/muse/midiedit/CMakeLists.txt +++ b/muse2/muse/midiedit/CMakeLists.txt @@ -42,19 +42,9 @@ QT4_WRAP_CPP ( midiedit_mocs ecanvas.h ) -# QT4_WRAP_UI ( midiedit_ui_headers -# QT4_WRAP_UI3 ( midiedit_ui_headers -# midicmd.ui -# gatetime.ui -# velocity.ui -# quantconfig.ui -# ) - -add_library ( midiedit STATIC +file (GLOB SOURCE_FILES # midicmd.h # gatetime.h - # ${midiedit_ui_headers} - ${midiedit_mocs} # midicmd.cpp # gatetime.cpp # velocity.cpp @@ -86,6 +76,14 @@ add_library ( midiedit STATIC ecanvas.cpp # ecanvas.h ) +add_library ( midiedit STATIC + ${SOURCE_FILES} + # ${midiedit_ui_headers} + ${midiedit_mocs} + ) + +set (FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${SOURCE_FILES} CACHE INTERNAL "") + add_dependencies(midiedit widgets) set_target_properties( midiedit diff --git a/muse2/muse/midiedit/quantconfig.cpp b/muse2/muse/midiedit/quantconfig.cpp index 59f2eaba..2f413e6a 100644 --- a/muse2/muse/midiedit/quantconfig.cpp +++ b/muse2/muse/midiedit/quantconfig.cpp @@ -14,11 +14,11 @@ #include "quantconfig.h" -const char* wtStrengthTxt = QT_TR_NOOP("sets amount of quantization:\n" +const char* wtStrengthTxt = QT_TRANSLATE_NOOP("@default", "sets amount of quantization:\n" "0 - no quantization\n" "100 - full quantization"); -const char* wtQLimitTxt = QT_TR_NOOP("don't quantize notes above this tick limit"); -const char* wtQLenTxt = QT_TR_NOOP("quantize also note len as default"); +const char* wtQLimitTxt = QT_TRANSLATE_NOOP("@default", "don't quantize notes above this tick limit"); +const char* wtQLenTxt = QT_TRANSLATE_NOOP("@default", "quantize also note len as default"); //--------------------------------------------------------- // QuantConfig diff --git a/muse2/muse/midiport.cpp b/muse2/muse/midiport.cpp index 0df08a59..02fed8d1 100644 --- a/muse2/muse/midiport.cpp +++ b/muse2/muse/midiport.cpp @@ -285,7 +285,7 @@ QMenu* midiPortsPopup(QWidget* parent, int checkPort) const QString& MidiPort::portname() const { //static const QString none("<none>"); - static const QString none(QT_TR_NOOP("<none>")); + static const QString none(QT_TRANSLATE_NOOP("@default", "<none>")); if (_device) return _device->name(); else @@ -1015,15 +1015,15 @@ void MidiPort::writeRouting(int level, Xml& xml) const { //xml.tag(level++, "Route"); - s = QT_TR_NOOP("Route"); + s = QT_TRANSLATE_NOOP("@default", "Route"); if(r->channel != -1 && r->channel != 0) - s += QString(QT_TR_NOOP(" channelMask=\"%1\"")).arg(r->channel); // Use new channel mask. + s += QString(QT_TRANSLATE_NOOP("@default", " channelMask=\"%1\"")).arg(r->channel); // Use new channel mask. xml.tag(level++, s.toLatin1().constData()); xml.tag(level, "source mport=\"%d\"/", portno()); - s = QT_TR_NOOP("dest"); - s += QString(QT_TR_NOOP(" name=\"%1\"/")).arg(Xml::xmlString(r->name())); + s = QT_TRANSLATE_NOOP("@default", "dest"); + s += QString(QT_TRANSLATE_NOOP("@default", " name=\"%1\"/")).arg(Xml::xmlString(r->name())); xml.tag(level, s.toLatin1().constData()); xml.etag(level--, "Route"); diff --git a/muse2/muse/mixer/CMakeLists.txt b/muse2/muse/mixer/CMakeLists.txt index 979d57a5..2a85ff32 100644 --- a/muse2/muse/mixer/CMakeLists.txt +++ b/muse2/muse/mixer/CMakeLists.txt @@ -19,11 +19,11 @@ #============================================================================= QT4_WRAP_CPP ( mixer_mocs amixer.h strip.h astrip.h mstrip.h meter.h rack.h panknob.h auxknob.h routedialog.h ) -QT4_WRAP_UI ( mixer_uis routedialogbase.ui ) -add_library ( mixer STATIC - ${mixer_mocs} - ${mixer_uis} +file (GLOB UI_FILES routedialogbase.ui ) +QT4_WRAP_UI ( mixer_uis ${UI_FILES} ) + +file (GLOB SOURCE_FILES amixer.cpp meter.cpp rack.cpp @@ -33,6 +33,14 @@ add_library ( mixer STATIC strip.cpp astrip.cpp mstrip.cpp ) +add_library ( mixer STATIC + ${SOURCE_FILES} + ${mixer_mocs} + ${mixer_uis} + ) + +set (FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${SOURCE_FILES} ${UI_FILES} CACHE INTERNAL "") + set_target_properties ( mixer PROPERTIES COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all.h" ) diff --git a/muse2/muse/mplugins/CMakeLists.txt b/muse2/muse/mplugins/CMakeLists.txt index 68bd7c0f..0c8a8a1b 100644 --- a/muse2/muse/mplugins/CMakeLists.txt +++ b/muse2/muse/mplugins/CMakeLists.txt @@ -36,8 +36,8 @@ # set ( CMAKE_LDD_FLAGS -module -avoid-version ) - -QT4_WRAP_UI ( mplugins_uis midifilter.ui mrconfigbase.ui ) +file (GLOB UI_FILES midifilter.ui mrconfigbase.ui ) +QT4_WRAP_UI ( mplugins_uis ${UI_FILES} ) if ( ENABLE_EXPERIMENTAL ) QT4_WRAP_UI ( mplugins_experimental_uis rhythmbase.ui) @@ -50,19 +50,25 @@ endif ( ENABLE_EXPERIMENTAL ) QT4_WRAP_CPP ( mplugins_mocs mittranspose.h midiitransform.h midifilterimpl.h mrconfig.h ${experimental_hdrs} ) -# add_library ( mplugins SHARED -add_library ( mplugins STATIC +file (GLOB SOURCE_FILES mitplugin.cpp mitplugin.h mittranspose.cpp midiitransform.cpp midifilterimpl.cpp mrconfig.cpp random.cpp random.h + ) + +# add_library ( mplugins SHARED +add_library ( mplugins STATIC + ${SOURCE_FILES} ${mplugins_mocs} ${mplugins_uis} ${experimental_srcs} ) +set (FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${SOURCE_FILES} ${UI_FILES} CACHE INTERNAL "") + add_dependencies(mplugins widgets) #target_link_libraries( mplugins diff --git a/muse2/muse/osc.cpp b/muse2/muse/osc.cpp index ad4f038f..26cd3a8a 100644 --- a/muse2/muse/osc.cpp +++ b/muse2/muse/osc.cpp @@ -861,7 +861,7 @@ bool OscIF::oscInitGui(const QString& typ, const QString& baseName, const QStrin //snprintf(oscUrl, 1024, "%s/%s", url, synti->name().toAscii().data()); //snprintf(oscUrl, 1024, "%s/%s", url, synti->name().ascii()); //snprintf(oscUrl, 1024, "%s/%s/%s", url, synth->info.baseName().ascii(), synti->name().ascii()); - typ = QT_TR_NOOP("dssi_synth"); + typ = QT_TRANSLATE_NOOP("@default", "dssi_synth"); baseName = _oscSynthIF->dssiSynth()->baseName(false); label = _oscSynthIF->dssiSynthI()->name(); name = _oscSynthIF->dssiSynth()->name(); @@ -873,7 +873,7 @@ bool OscIF::oscInitGui(const QString& typ, const QString& baseName, const QStrin #endif if(_oscPluginI) { - typ = QT_TR_NOOP("ladspa_efx"); + typ = QT_TRANSLATE_NOOP("@default", "ladspa_efx"); baseName = _oscPluginI->plugin()->lib(false); //name = _oscPluginI->name(); name = _oscPluginI->plugin()->label(); @@ -891,8 +891,8 @@ bool OscIF::oscInitGui(const QString& typ, const QString& baseName, const QStrin //snprintf(oscUrl, 1024, "%s/%s/%s", url, baseName.ascii(), name.ascii()); //snprintf(oscUrl, 1024, "%s%s/%s/%s", url, typ.toLatin1().constData(), baseName.toLatin1().constData(), name.toLatin1().constData()); - //oscUrl = QString("%1%2/%3/%4").arg(QString(QT_TR_NOOP(url))).arg(typ).arg(baseName).arg(name); - oscUrl = QString("%1%2/%3/%4").arg(QString(QT_TR_NOOP(url))).arg(typ).arg(baseName).arg(label); + //oscUrl = QString("%1%2/%3/%4").arg(QString(QT_TRANSLATE_NOOP("@default", url))).arg(typ).arg(baseName).arg(name); + oscUrl = QString("%1%2/%3/%4").arg(QString(QT_TRANSLATE_NOOP("@default", url))).arg(typ).arg(baseName).arg(label); //QString guiPath(info.path() + "/" + info.baseName()); //QString guiPath(synth->info.dirPath() + "/" + synth->info.baseName()); @@ -1302,7 +1302,7 @@ bool OscDssiIF::oscInitGui() if(!_oscSynthIF) return false; - return OscIF::oscInitGui(QT_TR_NOOP("dssi_synth"), _oscSynthIF->dssiSynth()->baseName(), + return OscIF::oscInitGui(QT_TRANSLATE_NOOP("@default", "dssi_synth"), _oscSynthIF->dssiSynth()->baseName(), _oscSynthIF->dssiSynth()->name(), _oscSynthIF->dssiSynthI()->name(), _oscSynthIF->dssiSynth()->filePath(), _oscSynthIF->dssiSynth()->path()); } @@ -1388,7 +1388,7 @@ bool OscEffectIF::oscInitGui() if(!_oscPluginI) return false; - return OscIF::oscInitGui(QT_TR_NOOP("ladspa_efx"), _oscPluginI->plugin()->lib(false), + return OscIF::oscInitGui(QT_TRANSLATE_NOOP("@default", "ladspa_efx"), _oscPluginI->plugin()->lib(false), _oscPluginI->plugin()->label(), _oscPluginI->label(), _oscPluginI->plugin()->filePath(), _oscPluginI->plugin()->dirPath(false)); } diff --git a/muse2/muse/plugin.cpp b/muse2/muse/plugin.cpp index 3ddb0baf..793fd446 100644 --- a/muse2/muse/plugin.cpp +++ b/muse2/muse/plugin.cpp @@ -57,16 +57,16 @@ PluginList plugins; /* static const char* preset_file_pattern[] = { - QT_TR_NOOP("Presets (*.pre *.pre.gz *.pre.bz2)"), - QT_TR_NOOP("All Files (*)"), + QT_TRANSLATE_NOOP("@default", "Presets (*.pre *.pre.gz *.pre.bz2)"), + QT_TRANSLATE_NOOP("@default", "All Files (*)"), 0 }; static const char* preset_file_save_pattern[] = { - QT_TR_NOOP("Presets (*.pre)"), - QT_TR_NOOP("gzip compressed presets (*.pre.gz)"), - QT_TR_NOOP("bzip2 compressed presets (*.pre.bz2)"), - QT_TR_NOOP("All Files (*)"), + QT_TRANSLATE_NOOP("@default", "Presets (*.pre)"), + QT_TRANSLATE_NOOP("@default", "gzip compressed presets (*.pre.gz)"), + QT_TRANSLATE_NOOP("@default", "bzip2 compressed presets (*.pre.bz2)"), + QT_TRANSLATE_NOOP("@default", "All Files (*)"), 0 }; */ diff --git a/muse2/muse/remote/CMakeLists.txt b/muse2/muse/remote/CMakeLists.txt index bf04110d..d137b683 100644 --- a/muse2/muse/remote/CMakeLists.txt +++ b/muse2/muse/remote/CMakeLists.txt @@ -5,7 +5,7 @@ include(${PROJECT_SOURCE_DIR}/pch.txt) -set (remote_src +file (GLOB remote_src pyapi.cpp ) @@ -14,6 +14,8 @@ add_library(remote STATIC ${PROJECT_BINARY_DIR}/all.h.pch ) +set (FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${remote_src} CACHE INTERNAL "") + set_source_files_properties( pyapi.cpp PROPERTIES COMPILE_FLAGS "-fPIC -include ${PROJECT_BINARY_DIR}/all.h -include ${PYTHON_INCLUDES} -DENABLE_PYTHON" diff --git a/muse2/muse/shortcuts.cpp b/muse2/muse/shortcuts.cpp index 05a7a94b..5fa914cf 100644 --- a/muse2/muse/shortcuts.cpp +++ b/muse2/muse/shortcuts.cpp @@ -18,7 +18,7 @@ ShortCut shortcuts[SHRT_NUM_OF_ELEMENTS]; void defShrt(int shrt, int key, const char* descr, int type, const char* xml) { shortcuts[shrt].key = key; - shortcuts[shrt].descr = QT_TR_NOOP(descr); + shortcuts[shrt].descr = QT_TRANSLATE_NOOP("@default", descr); shortcuts[shrt].type = type; shortcuts[shrt].xml = xml; } diff --git a/muse2/muse/song.cpp b/muse2/muse/song.cpp index 407b8dce..92135e16 100644 --- a/muse2/muse/song.cpp +++ b/muse2/muse/song.cpp @@ -2949,7 +2949,7 @@ void Song::chooseMidiRoutes(QButton* parent, MidiTrack* track, bool dst) for(int ch = 0; ch < MIDI_CHANNELS; ++ch) { //QAction* a = m->addAction(QString("Channel %1").arg(ch+1)); - //subp->insertItem(QT_TR_NOOP(QString("Channel %1").arg(ch+1)), i * MIDI_CHANNELS + ch); + //subp->insertItem(QT_TRANSLATE_NOOP("@default", QString("Channel %1").arg(ch+1)), i * MIDI_CHANNELS + ch); gid = i * MIDI_CHANNELS + ch; //printf("MidiStrip::iRoutePressed inserting gid:%d\n", gid); @@ -2972,7 +2972,7 @@ void Song::chooseMidiRoutes(QButton* parent, MidiTrack* track, bool dst) } } } - pup->insertItem(QT_TR_NOOP(md->name()), subp); + pup->insertItem(QT_TRANSLATE_NOOP("@default", md->name()), subp); } // QPopupMenu* pup = new QPopupMenu(iR); @@ -3039,7 +3039,7 @@ void Song::chooseMidiRoutes(QButton* parent, MidiTrack* track, bool dst) } //QString s(pup->text(n)); - //QT_TR_NOOP(md->name()) + //QT_TRANSLATE_NOOP("@default", md->name()) //Route srcRoute(s, false, -1); Route aRoute(md, ch); diff --git a/muse2/muse/track.cpp b/muse2/muse/track.cpp index 4cae5324..b4519d8d 100644 --- a/muse2/muse/track.cpp +++ b/muse2/muse/track.cpp @@ -747,9 +747,9 @@ void Track::writeRouting(int level, Xml& xml) const { if(!r->name().isEmpty()) { - s = QT_TR_NOOP("Route"); + s = QT_TRANSLATE_NOOP("@default", "Route"); if(r->channel != -1) - s += QString(QT_TR_NOOP(" channel=\"%1\"")).arg(r->channel); + s += QString(QT_TRANSLATE_NOOP("@default", " channel=\"%1\"")).arg(r->channel); ///Route dst(name(), true, r->channel); //xml.tag(level++, "Route"); @@ -758,11 +758,11 @@ void Track::writeRouting(int level, Xml& xml) const // p3.3.38 New routing scheme. ///xml.strTag(level, "srcNode", r->name()); //xml.tag(level, "source type=\"%d\" name=\"%s\"/", r->type, r->name().toLatin1().constData()); - s = QT_TR_NOOP("source"); + s = QT_TRANSLATE_NOOP("@default", "source"); if(r->type != Route::TRACK_ROUTE) - s += QString(QT_TR_NOOP(" type=\"%1\"")).arg(r->type); - //s += QString(QT_TR_NOOP(" name=\"%1\"/")).arg(r->name()); - s += QString(QT_TR_NOOP(" name=\"%1\"/")).arg(Xml::xmlString(r->name())); + s += QString(QT_TRANSLATE_NOOP("@default", " type=\"%1\"")).arg(r->type); + //s += QString(QT_TRANSLATE_NOOP("@default", " name=\"%1\"/")).arg(r->name()); + s += QString(QT_TRANSLATE_NOOP("@default", " name=\"%1\"/")).arg(Xml::xmlString(r->name())); xml.tag(level, s.toAscii().constData()); ///xml.strTag(level, "dstNode", dst.name()); @@ -793,21 +793,21 @@ void Track::writeRouting(int level, Xml& xml) const ///src = s.name(); ///} - s = QT_TR_NOOP("Route"); + s = QT_TRANSLATE_NOOP("@default", "Route"); if(r->type == Route::MIDI_PORT_ROUTE) // p3.3.50 { if(r->channel != -1 && r->channel != 0) - s += QString(QT_TR_NOOP(" channelMask=\"%1\"")).arg(r->channel); // Use new channel mask. + s += QString(QT_TRANSLATE_NOOP("@default", " channelMask=\"%1\"")).arg(r->channel); // Use new channel mask. } else { if(r->channel != -1) - s += QString(QT_TR_NOOP(" channel=\"%1\"")).arg(r->channel); + s += QString(QT_TRANSLATE_NOOP("@default", " channel=\"%1\"")).arg(r->channel); } if(r->channels != -1) - s += QString(QT_TR_NOOP(" channels=\"%1\"")).arg(r->channels); + s += QString(QT_TRANSLATE_NOOP("@default", " channels=\"%1\"")).arg(r->channels); if(r->remoteChannel != -1) - s += QString(QT_TR_NOOP(" remch=\"%1\"")).arg(r->remoteChannel); + s += QString(QT_TRANSLATE_NOOP("@default", " remch=\"%1\"")).arg(r->remoteChannel); //xml.tag(level++, "Route"); xml.tag(level++, s.toAscii().constData()); @@ -848,19 +848,19 @@ void Track::writeRouting(int level, Xml& xml) const //else // xml.tag(level, "dest type=\"%d\" name=\"%s\"/", r->type, r->name().toLatin1().constData()); - s = QT_TR_NOOP("dest"); + s = QT_TRANSLATE_NOOP("@default", "dest"); //if(r->type == Route::MIDI_DEVICE_ROUTE) // p3.3.49 Obsolete since 1.1-RC2 - // s += QString(QT_TR_NOOP(" devtype=\"%1\"")).arg(r->device->deviceType()); // + // s += QString(QT_TRANSLATE_NOOP("@default", " devtype=\"%1\"")).arg(r->device->deviceType()); // //if(r->type != Route::TRACK_ROUTE) // if(r->type != Route::TRACK_ROUTE && r->type != Route::MIDI_PORT_ROUTE) - s += QString(QT_TR_NOOP(" type=\"%1\"")).arg(r->type); + s += QString(QT_TRANSLATE_NOOP("@default", " type=\"%1\"")).arg(r->type); - //s += QString(QT_TR_NOOP(" name=\"%1\"/")).arg(r->name()); + //s += QString(QT_TRANSLATE_NOOP("@default", " name=\"%1\"/")).arg(r->name()); if(r->type == Route::MIDI_PORT_ROUTE) // p3.3.49 - s += QString(QT_TR_NOOP(" mport=\"%1\"/")).arg(r->midiPort); + s += QString(QT_TRANSLATE_NOOP("@default", " mport=\"%1\"/")).arg(r->midiPort); else - s += QString(QT_TR_NOOP(" name=\"%1\"/")).arg(Xml::xmlString(r->name())); + s += QString(QT_TRANSLATE_NOOP("@default", " name=\"%1\"/")).arg(Xml::xmlString(r->name())); xml.tag(level, s.toAscii().constData()); diff --git a/muse2/muse/transport.cpp b/muse2/muse/transport.cpp index 4dc59b93..57cbf123 100644 --- a/muse2/muse/transport.cpp +++ b/muse2/muse/transport.cpp @@ -35,12 +35,12 @@ #include "gconfig.h" #include "app.h" -static const char* recordTransportText = QT_TR_NOOP("Click this button to enable recording"); -static const char* stopTransportText = QT_TR_NOOP("Click this button to stop playback"); -static const char* playTransportText = QT_TR_NOOP("Click this button to start playback"); -static const char* startTransportText = QT_TR_NOOP("Click this button to rewind to start position"); -static const char* frewindTransportText = QT_TR_NOOP("Click this button to rewind"); -static const char* fforwardTransportText = QT_TR_NOOP("Click this button to forward current play position"); +static const char* recordTransportText = QT_TRANSLATE_NOOP("@default", "Click this button to enable recording"); +static const char* stopTransportText = QT_TRANSLATE_NOOP("@default", "Click this button to stop playback"); +static const char* playTransportText = QT_TRANSLATE_NOOP("@default", "Click this button to start playback"); +static const char* startTransportText = QT_TRANSLATE_NOOP("@default", "Click this button to rewind to start position"); +static const char* frewindTransportText = QT_TRANSLATE_NOOP("@default", "Click this button to rewind"); +static const char* fforwardTransportText = QT_TRANSLATE_NOOP("@default", "Click this button to forward current play position"); //--------------------------------------------------------- // toolButton diff --git a/muse2/muse/waveedit/CMakeLists.txt b/muse2/muse/waveedit/CMakeLists.txt index 1c36c138..4fb6915e 100644 --- a/muse2/muse/waveedit/CMakeLists.txt +++ b/muse2/muse/waveedit/CMakeLists.txt @@ -24,18 +24,28 @@ QT4_WRAP_CPP ( waveedit_mocs editgain.h ) -QT4_WRAP_UI (waveedit_ui_headers +file (GLOB UI_FILES editgainbase.ui ) -add_library ( waveedit STATIC - ${waveedit_ui_headers} - ${waveedit_mocs} +QT4_WRAP_UI (waveedit_ui_headers + ${UI_FILES} + ) + +file (GLOB SOURCE_FILES waveedit.cpp waveview.cpp editgain.cpp ) +add_library ( waveedit STATIC + ${SOURCE_FILES} + ${waveedit_ui_headers} + ${waveedit_mocs} + ) + +set (FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${SOURCE_FILES} ${UI_FILES} CACHE INTERNAL "") + set_target_properties( waveedit PROPERTIES COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all.h" ) diff --git a/muse2/muse/widgets/CMakeLists.txt b/muse2/muse/widgets/CMakeLists.txt index 93a15ef0..f3b699bc 100644 --- a/muse2/muse/widgets/CMakeLists.txt +++ b/muse2/muse/widgets/CMakeLists.txt @@ -131,7 +131,7 @@ QT4_WRAP_CPP (widget_mocs didyouknow.h ) -QT4_WRAP_UI (widget_ui_headers +file (GLOB UI_FILES aboutbox.ui appearancebase.ui cliplisteditorbase.ui @@ -157,7 +157,8 @@ QT4_WRAP_UI (widget_ui_headers transposebase.ui velocitybase.ui ) - + +QT4_WRAP_UI (widget_ui_headers ${UI_FILES}) # add_custom_command(OUTPUT ui_midisync.h # COMMAND ${QT_UIC_EXECUTABLE} @@ -167,9 +168,7 @@ QT4_WRAP_UI (widget_ui_headers # ADD_FILE_DEPENDENCIES(moc_midisync.cxx ${CMAKE_CURRENT_BINARY_DIR}/ui_midisync.h) -add_library ( widgets STATIC - ${widget_ui_headers} - ${widget_mocs} +file (GLOB SOURCE_FILES utils.cpp citem.cpp vscale.cpp @@ -233,6 +232,16 @@ add_library ( widgets STATIC menutitleitem.h ) +add_library ( widgets STATIC + ${widget_ui_headers} + ${widget_mocs} + ${SOURCE_FILES} + ) + +set (FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${SOURCE_FILES} ${UI_FILES} CACHE INTERNAL "") + +#add_dependencies(widgets translations) + # AM_CXXFLAGS +=-DSVNVERSION=\"$(shell svnversion)\" # EXEC_PROGRAM( svnversion # ARGS ${PROJECT_SOURCE_DIR} diff --git a/muse2/muse/widgets/comboQuant.cpp b/muse2/muse/widgets/comboQuant.cpp index 96ef51ff..87d88fca 100644 --- a/muse2/muse/widgets/comboQuant.cpp +++ b/muse2/muse/widgets/comboQuant.cpp @@ -20,9 +20,9 @@ static int quantTable[] = { }; static const char* quantStrings[] = { - QT_TR_NOOP("Off"), "64T", "32T", "16T", "8T", "4T", "2T", "1T", - QT_TR_NOOP("Off"), "64", "32", "16", "8", "4", "2", "1", - QT_TR_NOOP("Off"), "64.", "32.", "16.", "8.", "4.", "2.", "1." + QT_TRANSLATE_NOOP("@default", "Off"), "64T", "32T", "16T", "8T", "4T", "2T", "1T", + QT_TRANSLATE_NOOP("@default", "Off"), "64", "32", "16", "8", "4", "2", "1", + QT_TRANSLATE_NOOP("@default", "Off"), "64.", "32.", "16.", "8.", "4.", "2.", "1." }; //--------------------------------------------------------- diff --git a/muse2/muse/widgets/metronome.cpp b/muse2/muse/widgets/metronome.cpp index 9f56f45e..08c8abac 100644 --- a/muse2/muse/widgets/metronome.cpp +++ b/muse2/muse/widgets/metronome.cpp @@ -68,7 +68,7 @@ void MetronomeConfig::audioBeepRoutesClicked() int nn = 0; for(iAudioOutput iao = ol->begin(); iao != ol->end(); ++iao) { - QAction* action = pup->addAction(QT_TR_NOOP((*iao)->name())); + QAction* action = pup->addAction(QT_TRANSLATE_NOOP("@default", (*iao)->name())); action->setCheckable(true); action->setData(nn); if((*iao)->sendMetronome()) diff --git a/muse2/muse/widgets/tb1.cpp b/muse2/muse/widgets/tb1.cpp index 778dad94..49b4d027 100644 --- a/muse2/muse/widgets/tb1.cpp +++ b/muse2/muse/widgets/tb1.cpp @@ -31,9 +31,9 @@ static int rasterTable[] = { }; static const char* rasterStrings[] = { - QT_TR_NOOP("Off"), "2pp", "5pp", "64T", "32T", "16T", "8T", "4T", "2T", "1T", - QT_TR_NOOP("Off"), "3pp", "6pp", "64", "32", "16", "8", "4", "2", "1", - QT_TR_NOOP("Off"), "4pp", "7pp", "64.", "32.", "16.", "8.", "4.", "2.", "1." + QT_TRANSLATE_NOOP("@default", "Off"), "2pp", "5pp", "64T", "32T", "16T", "8T", "4T", "2T", "1T", + QT_TRANSLATE_NOOP("@default", "Off"), "3pp", "6pp", "64", "32", "16", "8", "4", "2", "1", + QT_TRANSLATE_NOOP("@default", "Off"), "4pp", "7pp", "64.", "32.", "16.", "8.", "4.", "2.", "1." }; static int quantTable[] = { @@ -43,9 +43,9 @@ static int quantTable[] = { }; static const char* quantStrings[] = { - QT_TR_NOOP("Off"), "64T", "32T", "16T", "8T", "4T", "2T", "1T", - QT_TR_NOOP("Off"), "64", "32", "16", "8", "4", "2", "1", - QT_TR_NOOP("Off"), "64.", "32.", "16.", "8.", "4.", "2.", "1." + QT_TRANSLATE_NOOP("@default", "Off"), "64T", "32T", "16T", "8T", "4T", "2T", "1T", + QT_TRANSLATE_NOOP("@default", "Off"), "64", "32", "16", "8", "4", "2", "1", + QT_TRANSLATE_NOOP("@default", "Off"), "64.", "32.", "16.", "8.", "4.", "2.", "1." }; //--------------------------------------------------------- diff --git a/muse2/muse/widgets/tools.cpp b/muse2/muse/widgets/tools.cpp index 87403abc..6359270e 100644 --- a/muse2/muse/widgets/tools.cpp +++ b/muse2/muse/widgets/tools.cpp @@ -23,38 +23,38 @@ #include "icons.h" #include "action.h" -const char* infoPointer = QT_TR_NOOP("select Pointer Tool:\n" +const char* infoPointer = QT_TRANSLATE_NOOP("@default", "select Pointer Tool:\n" "with the pointer tool you can:\n" " select parts\n" " move parts\n" " copy parts"); -const char* infoPencil = QT_TR_NOOP("select Pencil Tool:\n" +const char* infoPencil = QT_TRANSLATE_NOOP("@default", "select Pencil Tool:\n" "with the pencil tool you can:\n" " create new parts\n" " modify length of parts"); -const char* infoDel = QT_TR_NOOP("select Delete Tool:\n" +const char* infoDel = QT_TRANSLATE_NOOP("@default", "select Delete Tool:\n" "with the delete tool you can delete parts"); -const char* infoCut = QT_TR_NOOP("select Cut Tool:\n" +const char* infoCut = QT_TRANSLATE_NOOP("@default", "select Cut Tool:\n" "with the cut tool you can split a part"); -const char* infoGlue = QT_TR_NOOP("select Glue Tool:\n" +const char* infoGlue = QT_TRANSLATE_NOOP("@default", "select Glue Tool:\n" "with the glue tool you can glue two parts"); -const char* infoScore = QT_TR_NOOP("select Score Tool:\n"); -const char* infoQuant = QT_TR_NOOP("select Quantize Tool:\n" +const char* infoScore = QT_TRANSLATE_NOOP("@default", "select Score Tool:\n"); +const char* infoQuant = QT_TRANSLATE_NOOP("@default", "select Quantize Tool:\n" "insert display quantize event"); -const char* infoDraw = QT_TR_NOOP("select Drawing Tool"); -const char* infoMute = QT_TR_NOOP("select Muting Tool:\n" +const char* infoDraw = QT_TRANSLATE_NOOP("@default", "select Drawing Tool"); +const char* infoMute = QT_TRANSLATE_NOOP("@default", "select Muting Tool:\n" "click on part to mute/unmute"); ToolB toolList[] = { - {&pointerIcon, QT_TR_NOOP("pointer"), infoPointer }, - {&pencilIcon, QT_TR_NOOP("pencil"), infoPencil }, - {&deleteIcon, QT_TR_NOOP("eraser"), infoDel }, - {&cutIcon, QT_TR_NOOP("cutter"), infoCut }, - {¬e1Icon, QT_TR_NOOP("score"), infoScore }, - {&glueIcon, QT_TR_NOOP("glue"), infoGlue }, - {&quantIcon, QT_TR_NOOP("quantize"), infoQuant }, - {&drawIcon, QT_TR_NOOP("draw"), infoDraw }, - {&editmuteIcon, QT_TR_NOOP("mute parts"), infoMute }, + {&pointerIcon, QT_TRANSLATE_NOOP("@default", "pointer"), infoPointer }, + {&pencilIcon, QT_TRANSLATE_NOOP("@default", "pencil"), infoPencil }, + {&deleteIcon, QT_TRANSLATE_NOOP("@default", "eraser"), infoDel }, + {&cutIcon, QT_TRANSLATE_NOOP("@default", "cutter"), infoCut }, + {¬e1Icon, QT_TRANSLATE_NOOP("@default", "score"), infoScore }, + {&glueIcon, QT_TRANSLATE_NOOP("@default", "glue"), infoGlue }, + {&quantIcon, QT_TRANSLATE_NOOP("@default", "quantize"), infoQuant }, + {&drawIcon, QT_TRANSLATE_NOOP("@default", "draw"), infoDraw }, + {&editmuteIcon, QT_TRANSLATE_NOOP("@default", "mute parts"), infoMute }, }; //--------------------------------------------------------- |