diff options
| author | 2009-01-27 18:17:08 +0000 | |
|---|---|---|
| committer | 2009-01-27 18:17:08 +0000 | |
| commit | 38043652c1a8262433ea00662b1c2a2339a8fa4c (patch) | |
| tree | fac5bf87c1bb55ff935851e0635cf7885603aca0 /src/modules | |
| parent | first part of modules .pot fix (diff) | |
| download | KVIrc-38043652c1a8262433ea00662b1c2a2339a8fa4c.tar.gz KVIrc-38043652c1a8262433ea00662b1c2a2339a8fa4c.tar.bz2 KVIrc-38043652c1a8262433ea00662b1c2a2339a8fa4c.zip | |
second part of modules .pot fix
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@3046 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules')
| -rw-r--r-- | src/modules/raweditor/raweditor.cpp | 43 | ||||
| -rw-r--r-- | src/modules/regchan/libkviregchan.cpp | 12 | ||||
| -rw-r--r-- | src/modules/reguser/dialog.cpp | 82 | ||||
| -rw-r--r-- | src/modules/reguser/edituser.cpp | 80 | ||||
| -rw-r--r-- | src/modules/reguser/libkvireguser.cpp | 50 | ||||
| -rw-r--r-- | src/modules/reguser/wizard.cpp | 30 |
6 files changed, 147 insertions, 150 deletions
diff --git a/src/modules/raweditor/raweditor.cpp b/src/modules/raweditor/raweditor.cpp index e3804e13e..b53a944ec 100644 --- a/src/modules/raweditor/raweditor.cpp +++ b/src/modules/raweditor/raweditor.cpp @@ -91,7 +91,7 @@ KviRawEditor::KviRawEditor(QWidget * par) m_pTreeWidget->setColumnCount(1); - m_pTreeWidget->setHeaderLabel(__tr2qs("Raw Event")); + m_pTreeWidget->setHeaderLabel(__tr2qs_ctx("Raw Event","editor")); // m_pTreeWidget->setMultiSelection(false); m_pTreeWidget->setSelectionMode(QAbstractItemView::SingleSelection); @@ -103,12 +103,12 @@ KviRawEditor::KviRawEditor(QWidget * par) connect(m_pTreeWidget,SIGNAL(customContextMenuRequested(const QPoint &)),this,SLOT(customContextMenuRequested(const QPoint &))); - QPushButton * pb = new QPushButton(__tr2qs("&Export All To..."),boxi); + QPushButton * pb = new QPushButton(__tr2qs_ctx("&Export All To...","editor"),boxi); connect(pb,SIGNAL(clicked()),this,SLOT(exportAllEvents())); KviTalVBox * box = new KviTalVBox(spl); m_pNameEditor = new QLineEdit(box); - m_pNameEditor->setToolTip(__tr2qs("Edit the raw event handler name.")); + m_pNameEditor->setToolTip(__tr2qs_ctx("Edit the raw event handler name.","editor")); m_pEditor = KviScriptEditor::createInstance(box); m_bOneTimeSetupDone = false; @@ -145,11 +145,8 @@ void KviRawEditor::oneTimeSetup() it->setExpanded(true); } } - - } - void KviRawEditor::customContextMenuRequested(const QPoint &pos) { KviTalTreeWidgetItem *it; @@ -163,24 +160,24 @@ void KviRawEditor::customContextMenuRequested(const QPoint &pos) if(!(((KviRawHandlerTreeWidgetItem *)it)->m_bEnabled)) m_pContextPopup->insertItem( *(g_pIconManager->getSmallIcon(KVI_SMALLICON_HANDLER)), - __tr2qs("&Enable Handler"),this,SLOT(toggleCurrentHandlerEnabled())); + __tr2qs_ctx("&Enable Handler","editor"),this,SLOT(toggleCurrentHandlerEnabled())); else m_pContextPopup->insertItem( *(g_pIconManager->getSmallIcon(KVI_SMALLICON_HANDLERDISABLED)), - __tr2qs("&Disable Handler"),this,SLOT(toggleCurrentHandlerEnabled())); + __tr2qs_ctx("&Disable Handler","editor"),this,SLOT(toggleCurrentHandlerEnabled())); m_pContextPopup->insertItem( *(g_pIconManager->getSmallIcon(KVI_SMALLICON_QUIT)), - __tr2qs("Re&move Handler"), + __tr2qs_ctx("Re&move Handler","editor"), this,SLOT(removeCurrentHandler())); m_pContextPopup->insertItem( *(g_pIconManager->getSmallIcon(KVI_SMALLICON_FOLDER)), - __tr2qs("&Export Handler To..."), + __tr2qs_ctx("&Export Handler To...","editor"), this,SLOT(exportCurrentHandler())); } else { m_pContextPopup->insertItem( *(g_pIconManager->getSmallIcon(KVI_SMALLICON_HANDLER)), - __tr2qs("&New Handler"), + __tr2qs_ctx("&New Handler","editor"), this,SLOT(addHandlerForCurrentRaw())); } } @@ -188,7 +185,7 @@ void KviRawEditor::customContextMenuRequested(const QPoint &pos) m_pContextPopup->insertSeparator(); m_pContextPopup->insertItem( *(g_pIconManager->getSmallIcon(KVI_SMALLICON_RAWEVENT)), - __tr2qs("&Add Raw Event..."), + __tr2qs_ctx("&Add Raw Event...","editor"), this,SLOT(addRaw())); m_pContextPopup->popup(mapToGlobal(pos)); @@ -199,7 +196,7 @@ void KviRawEditor::getUniqueHandlerName(KviRawTreeWidgetItem *it,QString &buffer __range_valid(m_bOneTimeSetupDone); QString newName = buffer; - if(newName.isEmpty())newName = __tr2qs("unnamed"); + if(newName.isEmpty())newName = __tr2qs_ctx("unnamed","editor"); bool bFound = true; int idx = 1; @@ -229,7 +226,7 @@ void KviRawEditor::addRaw() { bool bOk = false; - int iIdx = QInputDialog::getInteger(this,__tr2qs("New Raw Event"),__tr2qs("Enter the numeric code of the message (0-999)"),0,0,999,1,&bOk); + int iIdx = QInputDialog::getInteger(this,__tr2qs_ctx("New Raw Event","editor"),__tr2qs_ctx("Enter the numeric code of the message (0-999)","editor"),0,0,999,1,&bOk); if(!bOk)return; @@ -261,7 +258,7 @@ void KviRawEditor::addHandlerForCurrentRaw() { if(it->parent() == 0) { - QString buffer = __tr2qs("default"); + QString buffer = __tr2qs_ctx("default","editor"); getUniqueHandlerName((KviRawTreeWidgetItem *)it,buffer); KviTalTreeWidgetItem * ch = new KviRawHandlerTreeWidgetItem(it,buffer,"",true); it->setExpanded(true); @@ -419,14 +416,14 @@ void KviRawEditor::exportCurrentHandler() QString szFile; - if(!KviFileDialog::askForSaveFileName(szFile,__tr2qs("Choose a Filename - KVIrc"),szName,"*.kvs",true,true,true))return; + if(!KviFileDialog::askForSaveFileName(szFile,__tr2qs_ctx("Choose a Filename - KVIrc","editor"),szName,"*.kvs",true,true,true))return; QString szOut; getExportEventBuffer(szOut,m_pLastEditedItem); if(!KviFileUtils::writeFile(szFile,szOut)) { - QMessageBox::warning(this,__tr2qs("Write Failed - KVIrc"),__tr2qs("Unable to write to the raw event file."),__tr2qs("&OK")); + QMessageBox::warning(this,__tr2qs_ctx("Write Failed - KVIrc","editor"),__tr2qs_ctx("Unable to write to the raw event file.","editor"),__tr2qs_ctx("&OK","editor")); } } @@ -462,11 +459,11 @@ void KviRawEditor::exportAllEvents() QString szFile; - if(!KviFileDialog::askForSaveFileName(szFile,__tr2qs("Choose a Filename - KVIrc"),szName,"*.kvs",true,true,true))return; + if(!KviFileDialog::askForSaveFileName(szFile,__tr2qs_ctx("Choose a Filename - KVIrc","editor"),szName,"*.kvs",true,true,true))return; if(!KviFileUtils::writeFile(szFile,out)) { - QMessageBox::warning(this,__tr2qs("Write Failed - KVIrc"),__tr2qs("Unable to write to the raw events file."),__tr2qs("Ok")); + QMessageBox::warning(this,__tr2qs_ctx("Write Failed - KVIrc","editor"),__tr2qs_ctx("Unable to write to the raw events file.","editor"),__tr2qs_ctx("Ok","editor")); } } @@ -481,17 +478,17 @@ KviRawEditorWindow::KviRawEditorWindow(KviFrame * lpFrm) m_pBase = new QWidget(this); QGridLayout * g = new QGridLayout(m_pBase); - QPushButton * btn = new QPushButton(__tr2qs("&OK"),m_pBase); + QPushButton * btn = new QPushButton(__tr2qs_ctx("&OK","editor"),m_pBase); connect(btn,SIGNAL(clicked()),this,SLOT(okClicked())); btn->setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_ACCEPT))); g->addWidget(btn,0,1); - btn = new QPushButton(__tr2qs("&Apply"),m_pBase); + btn = new QPushButton(__tr2qs_ctx("&Apply","editor"),m_pBase); connect(btn,SIGNAL(clicked()),this,SLOT(applyClicked())); btn->setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_ACCEPT))); g->addWidget(btn,0,2); - btn = new QPushButton(__tr2qs("Cancel"),m_pBase); + btn = new QPushButton(__tr2qs_ctx("Cancel","editor"),m_pBase); connect(btn,SIGNAL(clicked()),this,SLOT(cancelClicked())); btn->setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DISCARD))); g->addWidget(btn,0,3); @@ -534,7 +531,7 @@ void KviRawEditorWindow::resizeEvent(QResizeEvent *) void KviRawEditorWindow::fillCaptionBuffers() { - m_szPlainTextCaption = __tr2qs("Raw Editor"); + m_szPlainTextCaption = __tr2qs_ctx("Raw Editor","editor"); static QString p1("<nobr><font color=\""); static QString p2("\"><b>"); diff --git a/src/modules/regchan/libkviregchan.cpp b/src/modules/regchan/libkviregchan.cpp index 2010b524f..95159a04e 100644 --- a/src/modules/regchan/libkviregchan.cpp +++ b/src/modules/regchan/libkviregchan.cpp @@ -117,7 +117,7 @@ static bool regchan_kvs_cmd_remove(KviKvsModuleCommandCall * c) { g_pRegisteredChannelDataBase->remove(ch); } else { - if(!c->hasSwitch('q',"quiet"))c->warning(__tr2qs("No such channel/netmask entry in the database")); + if(!c->hasSwitch('q',"quiet"))c->warning(__tr2qs_ctx("No such channel/netmask entry in the database","register")); } return true; } @@ -174,7 +174,7 @@ static bool regchan_kvs_cmd_setProperty(KviKvsModuleCommandCall * c) ch->removeProperty(szProperty.toUtf8().data()); } } else { - if(!c->hasSwitch('q',"quiet")) c->warning(__tr2qs("No such channel/netmask entry in the database")); + if(!c->hasSwitch('q',"quiet")) c->warning(__tr2qs_ctx("No such channel/netmask entry in the database","register")); } return true; } @@ -194,7 +194,7 @@ static bool regchan_kvs_cmd_setProperty(KviKvsModuleCommandCall * c) static bool regchan_kvs_cmd_showlist(KviKvsModuleCommandCall * c) { - c->window()->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs("Registered channel list:")); + c->window()->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs_ctx("Registered channel list:","register")); int tot = 0; @@ -204,19 +204,19 @@ static bool regchan_kvs_cmd_showlist(KviKvsModuleCommandCall * c) for(KviRegisteredChannel * ch = l->first();ch;ch = l->next()) { tot++; - c->window()->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs("Channel: %c%s@%s"), + c->window()->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs_ctx("Channel: %c%s@%s","register"), KVI_TEXT_BOLD,ch->name().ptr(),ch->netMask().ptr()); KviPointerHashTableIterator<const char *,KviStr> pit(*(ch->propertyDict())); while(KviStr * s = pit.current()) { - c->window()->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs(" Property: %s=%s"),pit.currentKey(),s->ptr()); + c->window()->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs_ctx(" Property: %s=%s","register"),pit.currentKey(),s->ptr()); ++pit; } } ++it; } - c->window()->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs("Total %d channels"),tot); + c->window()->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs_ctx("Total %d channels","register"),tot); return true; } diff --git a/src/modules/reguser/dialog.cpp b/src/modules/reguser/dialog.cpp index 7632ab79c..9218d3603 100644 --- a/src/modules/reguser/dialog.cpp +++ b/src/modules/reguser/dialog.cpp @@ -78,7 +78,7 @@ KviRegisteredUsersListView::KviRegisteredUsersListView(QWidget * par) setColumnCount(2); QStringList labels; - labels << __tr2qs("Name") << __tr2qs("Flags"); + labels << __tr2qs_ctx("Name","register") << __tr2qs_ctx("Flags","register"); setHeaderLabels(labels); setColumnWidth(0,360); setColumnWidth(1,20); @@ -90,11 +90,11 @@ KviRegisteredUsersListView::KviRegisteredUsersListView(QWidget * par) setRootIsDecorated(TRUE); setSortingEnabled(true); - setToolTip(__tr2qs("<center>This is the list of registered users. " \ + setToolTip(__tr2qs_ctx("<center>This is the list of registered users. " \ "KVIrc can automatically recognize and associate properties to them.<br>" \ "Use the buttons on the right to add, edit and remove entries. " \ "The \"notify\" column allows you to quickly add users to the notify list. " \ - "Notify list fine-tuning can be performed by editing the entry properties.</center>")); + "Notify list fine-tuning can be performed by editing the entry properties.</center>","register")); } void KviRegisteredUsersListView::mousePressEvent (QMouseEvent *e) @@ -117,9 +117,9 @@ KviRegisteredUsersDialogItem::KviRegisteredUsersDialogItem(KviTalTreeWidgetItem szTmp = m_pUser->getProperty("notify"); if(szTmp.isEmpty()) { - t += __tr2qs("Notify disabled"); + t += __tr2qs_ctx("Notify disabled","register"); } else { - t += __tr2qs("Notify as: "); + t += __tr2qs_ctx("Notify as: ","register"); t += szTmp; } @@ -128,9 +128,9 @@ KviRegisteredUsersDialogItem::KviRegisteredUsersDialogItem(KviTalTreeWidgetItem szTmp = m_pUser->getProperty("comment"); if(szTmp.isEmpty()) { - t += __tr2qs("No comment set"); + t += __tr2qs_ctx("No comment set","register"); } else { - t += __tr2qs("Comment: "); + t += __tr2qs_ctx("Comment: ","register"); t += m_pUser->getProperty("comment"); } t += "</font></nobr>"; @@ -213,7 +213,7 @@ KviRegisteredUsersDialog::KviRegisteredUsersDialog(QWidget * par) g_pLocalRegisteredUserDataBase->copyFrom(g_pRegisteredUserDataBase); setWindowIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_REGUSERS))); - setWindowTitle(__tr2qs("Registered Users - KVIrc")); + setWindowTitle(__tr2qs_ctx("Registered Users - KVIrc","register")); QGridLayout * g = new QGridLayout(this); @@ -230,48 +230,48 @@ KviRegisteredUsersDialog::KviRegisteredUsersDialog(QWidget * par) vbox->setSpacing(4); g->addWidget(vbox,0,2); - m_pWizardAddButton = new QPushButton(__tr2qs("Add (Wizard)..."),vbox); + m_pWizardAddButton = new QPushButton(__tr2qs_ctx("Add (Wizard)...","register"),vbox); connect(m_pWizardAddButton,SIGNAL(clicked()),this,SLOT(addWizardClicked())); - m_pWizardAddButton->setToolTip(__tr2qs("Add a registered user by means of a user-friendly wizard.")); + m_pWizardAddButton->setToolTip(__tr2qs_ctx("Add a registered user by means of a user-friendly wizard.","register")); m_pWizardAddButton->setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_NEWITEMBYWIZARD))); - m_pAddButton = new QPushButton(__tr2qs("&Add..."),vbox); + m_pAddButton = new QPushButton(__tr2qs_ctx("&Add...","register"),vbox); connect(m_pAddButton,SIGNAL(clicked()),this,SLOT(addClicked())); - m_pAddButton->setToolTip(__tr2qs("Open the edit dialog to create a new user entry.")); + m_pAddButton->setToolTip(__tr2qs_ctx("Open the edit dialog to create a new user entry.","register")); m_pAddButton->setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_NEWITEM))); - m_pAddGroupButton = new QPushButton(__tr2qs("&Add Group..."),vbox); + m_pAddGroupButton = new QPushButton(__tr2qs_ctx("&Add Group...","register"),vbox); connect(m_pAddGroupButton,SIGNAL(clicked()),this,SLOT(addGroupClicked())); - m_pAddGroupButton->setToolTip(__tr2qs("Adds a new group")); + m_pAddGroupButton->setToolTip(__tr2qs_ctx("Adds a new group","register")); m_pAddGroupButton->setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_NEWITEM))); - m_pRemoveButton = new QPushButton(__tr2qs("Re&move"),vbox); + m_pRemoveButton = new QPushButton(__tr2qs_ctx("Re&move","register"),vbox); connect(m_pRemoveButton,SIGNAL(clicked()),this,SLOT(removeClicked())); m_pRemoveButton->setEnabled(false); - m_pRemoveButton->setToolTip(__tr2qs("Remove the currently selected entries.")); + m_pRemoveButton->setToolTip(__tr2qs_ctx("Remove the currently selected entries.","register")); m_pRemoveButton->setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DELETEITEM))); - m_pEditButton = new QPushButton(__tr2qs("&Edit..."),vbox); + m_pEditButton = new QPushButton(__tr2qs_ctx("&Edit...","register"),vbox); connect(m_pEditButton,SIGNAL(clicked()),this,SLOT(editClicked())); m_pEditButton->setEnabled(false); - m_pEditButton->setToolTip(__tr2qs("Edit the first selected entry.")); + m_pEditButton->setToolTip(__tr2qs_ctx("Edit the first selected entry.","register")); m_pEditButton->setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_EDITITEM))); QFrame * f = new QFrame(vbox); f->setFrameStyle(QFrame::HLine | QFrame::Sunken); - m_pExportButton = new QPushButton(__tr("Export To..."),vbox); + m_pExportButton = new QPushButton(__tr2qs_ctx("Export To...","register"),vbox); m_pExportButton->setEnabled(false); connect(m_pExportButton,SIGNAL(clicked()),this,SLOT(exportClicked())); - m_pExportButton->setToolTip(__tr2qs("Export the selected entries to a file.<br>All the data associated with the selected registered users will be exported.<br>You (or anyone else) can later import the entries by using the \"Import\" button.")); + m_pExportButton->setToolTip(__tr2qs_ctx("Export the selected entries to a file.<br>All the data associated with the selected registered users will be exported.<br>You (or anyone else) can later import the entries by using the \"Import\" button.","register")); m_pExportButton->setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_FLOPPY))); - m_pImportButton = new QPushButton(__tr("Import From..."),vbox); + m_pImportButton = new QPushButton(__tr2qs_ctx("Import From...","register"),vbox); connect(m_pImportButton,SIGNAL(clicked()),this,SLOT(importClicked())); - m_pImportButton->setToolTip(__tr2qs("Import entries from a file exported earlier by the \"export\" function of this dialog.")); + m_pImportButton->setToolTip(__tr2qs_ctx("Import entries from a file exported earlier by the \"export\" function of this dialog.","register")); m_pImportButton->setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_FOLDER))); @@ -282,12 +282,12 @@ KviRegisteredUsersDialog::KviRegisteredUsersDialog(QWidget * par) QPushButton * b; - b = new QPushButton(__tr2qs("&OK"),hbox); + b = new QPushButton(__tr2qs_ctx("&OK","register"),hbox); connect(b,SIGNAL(clicked()),this,SLOT(okClicked())); b->setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_ACCEPT))); //b->setMinimumWidth(120); - b = new QPushButton(__tr2qs("Cancel"),hbox); + b = new QPushButton(__tr2qs_ctx("Cancel","register"),hbox); connect(b,SIGNAL(clicked()),this,SLOT(cancelClicked())); b->setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DISCARD))); //b->setMinimumWidth(120); @@ -392,7 +392,7 @@ void KviRegisteredUsersDialog::addGroupClicked() { bool ok; QString text = QInputDialog::getText( this, - "KVIrc", __tr("Group name:"), QLineEdit::Normal, + "KVIrc", __tr2qs_ctx("Group name:","register"), QLineEdit::Normal, QString(), &ok ); if ( ok && !text.isEmpty() ) { g_pLocalRegisteredUserDataBase->addGroup(text); @@ -405,7 +405,7 @@ void KviRegisteredUsersDialog::editGroup(KviRegisteredUserGroup* group) bool ok; QString text = QInputDialog::getText( this, - "KVIrc", __tr("Group name:"), QLineEdit::Normal, + "KVIrc", __tr2qs_ctx("Group name:","register"), QLineEdit::Normal, group->name(), &ok ); if ( ok && !text.isEmpty() ) { QString szOldGroup=group->name(); @@ -448,7 +448,7 @@ void KviRegisteredUsersDialog::rightButtonPressed ( QTreeWidgetItem * pItem, QPo connect(groups,SIGNAL(activated ( int )),this,SLOT(moveToGroupMenuClicked(int))); KviTalPopupMenu *mainPopup = new KviTalPopupMenu; - mainPopup->insertItem(__tr("Move to group"),groups); + mainPopup->insertItem(__tr2qs_ctx("Move to group","register"),groups); mainPopup->exec(pnt); } } @@ -489,15 +489,15 @@ void KviRegisteredUsersDialog::fillList() for(KviRegisteredUser * u = d->first();u;u = d->next()) { if(u->group().isEmpty()) - u->setGroup(__tr("Default")); + u->setGroup(__tr2qs_ctx("Default","register")); if(groupItems.find(u->group())) item = new KviRegisteredUsersDialogItem(groupItems.find(u->group()),u); - else if(groupItems.find(__tr("Default"))) - item = new KviRegisteredUsersDialogItem(groupItems.find(__tr("Default")),u); + else if(groupItems.find(__tr2qs_ctx("Default","register"))) + item = new KviRegisteredUsersDialogItem(groupItems.find(__tr2qs_ctx("Default","register")),u); else { //should never be called - KviRegisteredUserGroup* pGroup = g_pLocalRegisteredUserDataBase->addGroup(__tr("Default")); + KviRegisteredUserGroup* pGroup = g_pLocalRegisteredUserDataBase->addGroup(__tr2qs_ctx("Default","register")); KviRegisteredUsersGroupItem* pCur = new KviRegisteredUsersGroupItem(m_pListView,pGroup); - groupItems.insert(__tr("Default"),pCur); + groupItems.insert(__tr2qs_ctx("Default","register"),pCur); item = new KviRegisteredUsersDialogItem(pCur,u); } } @@ -680,20 +680,20 @@ void KviRegisteredUsersDialog::exportClicked() if(nEntries < 1) { - KviMessageBox::warning(__tr("No entries selected.")); + KviMessageBox::warning(__tr2qs_ctx("No entries selected.","register")); return; } QString buffer; - if(!KviFileDialog::askForSaveFileName(buffer,__tr("Choose a Filename - KVIrc"),0,0,true,true))return; + if(!KviFileDialog::askForSaveFileName(buffer,__tr2qs_ctx("Choose a Filename - KVIrc","register"),0,0,true,true))return; if(!g_pRegisteredUsersDialog)return; // we have been deleted! KviFile f(buffer); if(!f.open(QIODevice::WriteOnly | QIODevice::Truncate)) { - KviMessageBox::warning(__tr("Can't open file %Q for writing."),&buffer); + KviMessageBox::warning(__tr2qs_ctx("Can't open file %Q for writing.","register"),&buffer); return; } @@ -772,7 +772,7 @@ void KviRegisteredUsersDialog::exportClicked() write_error: - KviMessageBox::warning(__tr("Can't export the registered users database: Write error.")); + KviMessageBox::warning(__tr2qs_ctx("Can't export the registered users database: Write error.","register")); f.close(); return; @@ -786,14 +786,14 @@ void KviRegisteredUsersDialog::importClicked() //KviStr buffer; QString buffer; - if(!KviFileDialog::askForOpenFileName(buffer,__tr("Choose a Filename - KVIrc")))return; + if(!KviFileDialog::askForOpenFileName(buffer,__tr2qs_ctx("Choose a Filename - KVIrc","register")))return; if(!g_pRegisteredUsersDialog)return; // we have been deleted! KviFile f(buffer); if(!f.open(QIODevice::ReadOnly)) { - KviMessageBox::warning(__tr2qs("Can't open file %s for reading."),&buffer); + KviMessageBox::warning(__tr2qs_ctx("Can't open file %s for reading.","register"),&buffer); return; } @@ -804,14 +804,14 @@ void KviRegisteredUsersDialog::importClicked() if(hf.magic != KVI_REGUSER_DB_FILE_MAGIC) { - KviMessageBox::warning(__tr2qs("The file %s doesn't appear to be a valid registered users database."),&buffer); + KviMessageBox::warning(__tr2qs_ctx("The file %s doesn't appear to be a valid registered users database.","register"),&buffer); f.close(); return; } if(hf.version != KVI_REGUSER_DB_FILE_VERSION) { - KviMessageBox::warning(__tr2qs("The file %s contains an invalid registered users database version."),&buffer); + KviMessageBox::warning(__tr2qs_ctx("The file %s contains an invalid registered users database version.","register"),&buffer); f.close(); return; } @@ -879,7 +879,7 @@ void KviRegisteredUsersDialog::importClicked() read_error: - KviMessageBox::warning(__tr("Can't import the registered users database: Read error.")); + KviMessageBox::warning(__tr2qs_ctx("Can't import the registered users database: Read error.","register")); f.close(); return; diff --git a/src/modules/reguser/edituser.cpp b/src/modules/reguser/edituser.cpp index e16e85dab..bd2a29a61 100644 --- a/src/modules/reguser/edituser.cpp +++ b/src/modules/reguser/edituser.cpp @@ -75,7 +75,7 @@ KviReguserPropertiesDialog::KviReguserPropertiesDialog(QWidget * p,KviPointerHas setWindowModality(Qt::WindowModal); m_pPropertyDict = dict; - setWindowTitle(__tr2qs("Property Editor")); + setWindowTitle(__tr2qs_ctx("Property Editor","register")); setWindowIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_LINUX))); QGridLayout * g = new QGridLayout(this); @@ -87,8 +87,8 @@ KviReguserPropertiesDialog::KviReguserPropertiesDialog(QWidget * p,KviPointerHas m_pTable->setSelectionMode(QTableWidget::NoSelection); QStringList header; - header.append(__tr2qs("Property")); - header.append(__tr2qs("Value")); + header.append(__tr2qs_ctx("Property","register")); + header.append(__tr2qs_ctx("Value","register")); m_pTable->setHorizontalHeaderLabels(header); m_pTable->setMinimumSize(250,250); @@ -98,11 +98,11 @@ KviReguserPropertiesDialog::KviReguserPropertiesDialog(QWidget * p,KviPointerHas vb->setSpacing(4); g->addWidget(vb,0,1,0,3); - m_pAddButton = new QPushButton(__tr2qs("&New"),vb); + m_pAddButton = new QPushButton(__tr2qs_ctx("&New","register"),vb); connect(m_pAddButton,SIGNAL(clicked()),this,SLOT(addClicked())); m_pAddButton->setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_NEWITEM))); - m_pDelButton = new QPushButton(__tr2qs("&Remove"),vb); + m_pDelButton = new QPushButton(__tr2qs_ctx("&Remove","register"),vb); connect(m_pDelButton,SIGNAL(clicked()),this,SLOT(delClicked())); m_pDelButton->setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DELETEITEM))); @@ -110,11 +110,11 @@ KviReguserPropertiesDialog::KviReguserPropertiesDialog(QWidget * p,KviPointerHas b->setSpacing(4); //g->addMultiCellWidget(b,2,2,1,2); g->addWidget(b,1,1); - QPushButton * pb = new QPushButton(__tr2qs("&OK"),b); + QPushButton * pb = new QPushButton(__tr2qs_ctx("&OK","register"),b); connect(pb,SIGNAL(clicked()),this,SLOT(okClicked())); pb->setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_ACCEPT))); - pb = new QPushButton(__tr2qs("Cancel"),b); + pb = new QPushButton(__tr2qs_ctx("Cancel","register"),b); connect(pb,SIGNAL(clicked()),this,SLOT(reject())); pb->setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DISCARD))); @@ -225,11 +225,11 @@ KviReguserMaskDialog::KviReguserMaskDialog(QWidget * p,KviIrcMask * m) setWindowModality(Qt::WindowModal); m_pMask = m; - setWindowTitle(__tr2qs("Mask Editor")); + setWindowTitle(__tr2qs_ctx("Mask Editor","register")); QGridLayout * g = new QGridLayout(this); - QLabel * l = new QLabel(__tr2qs("Insert a mask for this user.<br>It can contain the wildcard characters '*' and '?'."),this); + QLabel * l = new QLabel(__tr2qs_ctx("Insert a mask for this user.<br>It can contain the wildcard characters '*' and '?'.","register"),this); //l->setAlignment(Qt::AlignCenter); g->addWidget(l,0,0,1,2); @@ -239,7 +239,7 @@ KviReguserMaskDialog::KviReguserMaskDialog(QWidget * p,KviIrcMask * m) m_pNickEdit = new QLineEdit(b); //m_pNickEdit->setMinimumWidth(120); m_pNickEdit->setAlignment(Qt::AlignRight); - m_pNickEdit->setToolTip(__tr2qs("<center>This the <b>nickname</b> that will match this user, default value is the registered name.</center>")); + m_pNickEdit->setToolTip(__tr2qs_ctx("<center>This the <b>nickname</b> that will match this user, default value is the registered name.</center>","register")); l = new QLabel("<center><b>!</b></center>",b); l->setAlignment(Qt::AlignCenter); @@ -248,7 +248,7 @@ KviReguserMaskDialog::KviReguserMaskDialog(QWidget * p,KviIrcMask * m) m_pUserEdit = new QLineEdit(b); //m_pUserEdit->setMinimumWidth(120); m_pUserEdit->setAlignment(Qt::AlignCenter); - m_pUserEdit->setToolTip(__tr2qs("<center>This the <b>username</b> that will match this user. <b>*</b> will match any username.</center>")); + m_pUserEdit->setToolTip(__tr2qs_ctx("<center>This the <b>username</b> that will match this user. <b>*</b> will match any username.</center>","register")); l = new QLabel("<center><b>@</b></center>",b); l->setAlignment(Qt::AlignCenter); @@ -257,7 +257,7 @@ KviReguserMaskDialog::KviReguserMaskDialog(QWidget * p,KviIrcMask * m) m_pHostEdit = new QLineEdit(b); //m_pHostEdit->setMinimumWidth(120); m_pHostEdit->setAlignment(Qt::AlignLeft); - m_pHostEdit->setToolTip(__tr2qs("<center>This the <b>hostname</b> that will match this user. <b>*</b> will match any hostname.</center>")); + m_pHostEdit->setToolTip(__tr2qs_ctx("<center>This the <b>hostname</b> that will match this user. <b>*</b> will match any hostname.</center>","register")); // just a spacer // l = new QLabel("<nobr> <nobr>",this); @@ -271,11 +271,11 @@ KviReguserMaskDialog::KviReguserMaskDialog(QWidget * p,KviIrcMask * m) b->setSpacing(4); g->addWidget(b,2,1); - QPushButton * pb = new QPushButton(__tr2qs("&OK"),b); + QPushButton * pb = new QPushButton(__tr2qs_ctx("&OK","register"),b); connect(pb,SIGNAL(clicked()),this,SLOT(okClicked())); //pb->setMinimumWidth(120); - pb = new QPushButton(__tr2qs("Cancel"),b); + pb = new QPushButton(__tr2qs_ctx("Cancel","register"),b); connect(pb,SIGNAL(clicked()),this,SLOT(reject())); //pb->setMinimumWidth(120); @@ -333,19 +333,19 @@ KviRegisteredUserEntryDialog::KviRegisteredUserEntryDialog(QWidget *p,KviRegiste //setMinimumSize(400,450); setWindowIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_LINUX))); - setWindowTitle(__tr2qs("Registered User Entry")); + setWindowTitle(__tr2qs_ctx("Registered User Entry","register")); QWidget * p1 = new QWidget(this); QGridLayout * g = new QGridLayout(p1); - QLabel * l = new QLabel(__tr2qs("Name:"),p1); + QLabel * l = new QLabel(__tr2qs_ctx("Name:","register"),p1); g->addWidget(l,0,0); m_pNameEdit = new QLineEdit(p1); g->addWidget(m_pNameEdit,0,1); - l = new QLabel(__tr2qs("Comment:"),p1); + l = new QLabel(__tr2qs_ctx("Comment:","register"),p1); g->addWidget(l,1,0); m_pCommentEdit = new QLineEdit(p1); @@ -355,7 +355,7 @@ KviRegisteredUserEntryDialog::KviRegisteredUserEntryDialog(QWidget *p,KviRegiste g->addWidget(f,2,0,1,2); f->setFrameStyle(QFrame::HLine | QFrame::Sunken); - l = new QLabel(__tr2qs("Masks:"),p1); + l = new QLabel(__tr2qs_ctx("Masks:","register"),p1); g->addWidget(l,3,0,1,2); m_pMaskListBox = new QListWidget(p1); @@ -368,16 +368,16 @@ KviRegisteredUserEntryDialog::KviRegisteredUserEntryDialog(QWidget *p,KviRegiste g->addWidget(b,5,0,1,2); b->setSpacing(4); - m_pAddMaskButton = new QPushButton(__tr2qs("&Add..."),b); + m_pAddMaskButton = new QPushButton(__tr2qs_ctx("&Add...","register"),b); connect(m_pAddMaskButton,SIGNAL(clicked()),this,SLOT(addMaskClicked())); m_pAddMaskButton->setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_NEWITEM))); - m_pDelMaskButton = new QPushButton(__tr2qs("Re&move"),b); + m_pDelMaskButton = new QPushButton(__tr2qs_ctx("Re&move","register"),b); m_pDelMaskButton->setEnabled(false); connect(m_pDelMaskButton,SIGNAL(clicked()),this,SLOT(delMaskClicked())); m_pDelMaskButton->setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DELETEITEM))); - m_pEditMaskButton = new QPushButton(__tr2qs("&Edit"),b); + m_pEditMaskButton = new QPushButton(__tr2qs_ctx("&Edit","register"),b); m_pEditMaskButton->setEnabled(false); connect(m_pEditMaskButton,SIGNAL(clicked()),this,SLOT(editMaskClicked())); m_pEditMaskButton->setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_EDITITEM))); @@ -385,20 +385,20 @@ KviRegisteredUserEntryDialog::KviRegisteredUserEntryDialog(QWidget *p,KviRegiste g->setRowStretch(4,1); g->setColumnStretch(1,1); - addTab(p1,__tr2qs("Identity")); + addTab(p1,__tr2qs_ctx("Identity","register")); QWidget * p2 = new QWidget(this); g = new QGridLayout(p2); - m_pNotifyCheck = new QCheckBox(__tr2qs("Notify when user is online"),p2); + m_pNotifyCheck = new QCheckBox(__tr2qs_ctx("Notify when user is online","register"),p2); g->addWidget(m_pNotifyCheck,0,0,1,3); - l = new QLabel(__tr2qs("Notify nicknames:"),p2); + l = new QLabel(__tr2qs_ctx("Notify nicknames:","register"),p2); l->setEnabled(m_pNotifyCheck->isChecked()); g->addWidget(l,1,0); connect(m_pNotifyCheck,SIGNAL(toggled(bool)),l,SLOT(setEnabled(bool))); - m_pNotifyCheck->setToolTip(__tr2qs("<center>You can enter a space separated list of nicknames.</center>")); + m_pNotifyCheck->setToolTip(__tr2qs_ctx("<center>You can enter a space separated list of nicknames.</center>","register")); m_pNotifyNick = new QLineEdit(p2); @@ -423,14 +423,14 @@ KviRegisteredUserEntryDialog::KviRegisteredUserEntryDialog(QWidget *p,KviRegiste } if(!m_pAvatar)m_pAvatar = new KviPixmap(); - m_pAvatarSelector = new KviPixmapSelector(p2,__tr2qs("Avatar"),m_pAvatar,true); + m_pAvatarSelector = new KviPixmapSelector(p2,__tr2qs_ctx("Avatar","register"),m_pAvatar,true); g->addWidget(m_pAvatarSelector,3,0,1,3); f = new QFrame(p2); f->setFrameStyle(QFrame::HLine | QFrame::Sunken); g->addWidget(f,4,0,1,3); - m_pCustomColorCheck = new QCheckBox(__tr2qs("Use custom color in userlist"),p2); + m_pCustomColorCheck = new QCheckBox(__tr2qs_ctx("Use custom color in userlist","register"),p2); if(r) m_pCustomColorCheck->setChecked(r->getBoolProperty("useCustomColor")); g->addWidget(m_pCustomColorCheck,5,0,1,2); @@ -438,53 +438,53 @@ KviRegisteredUserEntryDialog::KviRegisteredUserEntryDialog(QWidget *p,KviRegiste m_pCustomColorSelector = new KviColorSelector(p2,QString(),m_pCustomColor,1); g->addWidget(m_pCustomColorSelector,5,2); - QPushButton * pb = new QPushButton(__tr2qs("All Properties..."),p2); + QPushButton * pb = new QPushButton(__tr2qs_ctx("All Properties...","register"),p2); connect(pb,SIGNAL(clicked()),this,SLOT(editAllPropertiesClicked())); g->addWidget(pb,6,2); g->setColumnStretch(1,1); g->setRowStretch(3,1); - addTab(p2,__tr2qs("Properties")); + addTab(p2,__tr2qs_ctx("Properties","register")); // Ignore TAB KviTalVBox * vb = new KviTalVBox(this); vb->setMargin(10); - m_pIgnoreEnabled = new QCheckBox(__tr2qs("Enable ignore for this user"),vb); + m_pIgnoreEnabled = new QCheckBox(__tr2qs_ctx("Enable ignore for this user","register"),vb); - QGroupBox * gb = new QGroupBox(__tr2qs("Ignore features"),vb); + QGroupBox * gb = new QGroupBox(__tr2qs_ctx("Ignore features","register"),vb); connect(m_pIgnoreEnabled,SIGNAL(toggled(bool)),gb,SLOT(setEnabled(bool))); QVBoxLayout * layout = new QVBoxLayout(gb); layout->setMargin(20); layout->setSpacing(3); - m_pIgnoreQuery = new QCheckBox(__tr2qs("Ignore query-messages"),gb); + m_pIgnoreQuery = new QCheckBox(__tr2qs_ctx("Ignore query-messages","register"),gb); layout->addWidget(m_pIgnoreQuery); - m_pIgnoreChannel = new QCheckBox(__tr2qs("Ignore channel-messages"),gb); + m_pIgnoreChannel = new QCheckBox(__tr2qs_ctx("Ignore channel-messages","register"),gb); layout->addWidget(m_pIgnoreChannel); - m_pIgnoreNotice = new QCheckBox(__tr2qs("Ignore notice-messages"),gb); + m_pIgnoreNotice = new QCheckBox(__tr2qs_ctx("Ignore notice-messages","register"),gb); layout->addWidget(m_pIgnoreNotice); - m_pIgnoreCtcp = new QCheckBox(__tr2qs("Ignore ctcp-messages"),gb); + m_pIgnoreCtcp = new QCheckBox(__tr2qs_ctx("Ignore ctcp-messages","register"),gb); layout->addWidget(m_pIgnoreCtcp); - m_pIgnoreInvite = new QCheckBox(__tr2qs("Ignore invites"),gb); + m_pIgnoreInvite = new QCheckBox(__tr2qs_ctx("Ignore invites","register"),gb); layout->addWidget(m_pIgnoreInvite); - m_pIgnoreDcc = new QCheckBox(__tr2qs("Ignore DCCs"),gb); + m_pIgnoreDcc = new QCheckBox(__tr2qs_ctx("Ignore DCCs","register"),gb); layout->addWidget(m_pIgnoreDcc); QWidget *w = new QWidget(vb); w->setSizePolicy(QSizePolicy::Ignored,QSizePolicy::Ignored); - addTab(vb,__tr2qs("Ignore")); + addTab(vb,__tr2qs_ctx("Ignore","register")); - setCancelButton(__tr2qs("Cancel")); - setOkButton(__tr2qs("&OK")); + setCancelButton(__tr2qs_ctx("Cancel","register")); + setOkButton(__tr2qs_ctx("&OK","register")); connect(this,SIGNAL(applyButtonPressed()),this,SLOT(okClicked())); connect(this,SIGNAL(cancelButtonPressed()),this,SLOT(reject())); diff --git a/src/modules/reguser/libkvireguser.cpp b/src/modules/reguser/libkvireguser.cpp index da0b64630..325c56702 100644 --- a/src/modules/reguser/libkvireguser.cpp +++ b/src/modules/reguser/libkvireguser.cpp @@ -185,7 +185,7 @@ static bool reguser_kvs_cmd_add(KviKvsModuleCommandCall * c) KVSM_PARAMETERS_END(c) if(szName.isEmpty()) { - if(!c->hasSwitch('q',"quiet"))c->warning(__tr2qs("No name specified")); + if(!c->hasSwitch('q',"quiet"))c->warning(__tr2qs_ctx("No name specified","register")); return true; } @@ -205,7 +205,7 @@ static bool reguser_kvs_cmd_add(KviKvsModuleCommandCall * c) { u = g_pRegisteredUserDataBase->findUserByName(szName); } else { - if(!c->hasSwitch('q',"quiet"))c->warning(__tr2qs("User already registered: found exact name match")); + if(!c->hasSwitch('q',"quiet"))c->warning(__tr2qs_ctx("User already registered: found exact name match","register")); } } @@ -218,7 +218,7 @@ static bool reguser_kvs_cmd_add(KviKvsModuleCommandCall * c) u = g_pRegisteredUserDataBase->addMask(u,m); if(u != 0) { - if(!c->hasSwitch('q',"quiet"))c->warning(__tr2qs("Mask %Q is already used to identify user %s"),&szMask,u->name().toUtf8().data()); + if(!c->hasSwitch('q',"quiet"))c->warning(__tr2qs_ctx("Mask %Q is already used to identify user %s","register"),&szMask,u->name().toUtf8().data()); } } } @@ -265,13 +265,13 @@ static bool reguser_kvs_cmd_remove(KviKvsModuleCommandCall * c) if(szName.isEmpty()) { - if(!c->hasSwitch('q',"quiet"))c->warning(__tr2qs("No name specified")); + if(!c->hasSwitch('q',"quiet"))c->warning(__tr2qs_ctx("No name specified","register")); return true; } if(!(g_pRegisteredUserDataBase->removeUser(szName))) { - c->warning(__tr2qs("User not found (%Q)"),&szName); + c->warning(__tr2qs_ctx("User not found (%Q)","register"),&szName); } else { if(c->hasSwitch('n',"restartnotifylists"))g_pApp->restartNotifyLists(); } @@ -328,20 +328,20 @@ static bool reguser_kvs_cmd_addmask(KviKvsModuleCommandCall * c) if(szName.isEmpty()) { - c->warning(__tr2qs("No name specified")); + c->warning(__tr2qs_ctx("No name specified","register")); return true; } if(szMask.isEmpty()) { - c->warning(__tr2qs("No mask specified")); + c->warning(__tr2qs_ctx("No mask specified","register")); return true; } KviRegisteredUser * u = g_pRegisteredUserDataBase->findUserByName(szName); if(!u) { - c->warning(__tr2qs("User %Q not found"),&szName); + c->warning(__tr2qs_ctx("User %Q not found","register"),&szName); return true; } @@ -351,7 +351,7 @@ static bool reguser_kvs_cmd_addmask(KviKvsModuleCommandCall * c) u = g_pRegisteredUserDataBase->addMask(u,mk); - if(u != 0)c->warning(__tr2qs("Mask %Q already used to identify user %Q"),&szMask,&(u->name())); + if(u != 0)c->warning(__tr2qs_ctx("Mask %Q already used to identify user %Q","register"),&szMask,&(u->name())); return true; } @@ -399,14 +399,14 @@ static bool reguser_kvs_cmd_delmask(KviKvsModuleCommandCall * c) if(szMask.isEmpty()) { - c->warning(__tr2qs("No mask specified")); + c->warning(__tr2qs_ctx("No mask specified","register")); return true; } KviIrcMask mk(szMask); if(!g_pRegisteredUserDataBase->removeMask(mk)) { - c->warning(__tr2qs("Mask %Q not found"),&szMask); + c->warning(__tr2qs_ctx("Mask %Q not found","register"),&szMask); } return true; @@ -448,14 +448,14 @@ static bool reguser_kvs_cmd_setIgnoreEnabled(KviKvsModuleCommandCall * c) if(szName.isEmpty()) { - if(!c->hasSwitch('q',"quiet"))c->warning(__tr2qs("No name specified")); + if(!c->hasSwitch('q',"quiet"))c->warning(__tr2qs_ctx("No name specified","register")); return true; } KviRegisteredUser * u = g_pRegisteredUserDataBase->findUserByName(szName); if(!u) { - if(!c->hasSwitch('q',"quiet"))c->warning(__tr2qs("User %Q not found"),&szName); + if(!c->hasSwitch('q',"quiet"))c->warning(__tr2qs_ctx("User %Q not found","register"),&szName); } else { u->setIgnoreEnabled(bEnabled); } @@ -513,14 +513,14 @@ static bool reguser_kvs_cmd_setIgnoreFlags(KviKvsModuleCommandCall * c) if(szName.isEmpty()) { - if(!c->hasSwitch('q',"quiet"))c->warning(__tr2qs("No name specified")); + if(!c->hasSwitch('q',"quiet"))c->warning(__tr2qs_ctx("No name specified","register")); return true; } KviRegisteredUser * u = g_pRegisteredUserDataBase->findUserByName(szName); if(!u) { - if(!c->hasSwitch('q',"quiet"))c->warning(__tr2qs("User %Q not found"),&szName); + if(!c->hasSwitch('q',"quiet"))c->warning(__tr2qs_ctx("User %Q not found","register"),&szName); } else { int iIgnoreFlags=0; if(c->hasSwitch('p',"query")) @@ -687,20 +687,20 @@ static bool reguser_kvs_cmd_setproperty(KviKvsModuleCommandCall * c) if(szName.isEmpty()) { - if(!c->hasSwitch('q',"quiet"))c->warning(__tr2qs("No name specified")); + if(!c->hasSwitch('q',"quiet"))c->warning(__tr2qs_ctx("No name specified","register")); return true; } if(szProperty.isEmpty()) { - if(!c->hasSwitch('q',"quiet"))c->warning(__tr2qs("No property specified")); + if(!c->hasSwitch('q',"quiet"))c->warning(__tr2qs_ctx("No property specified","register")); return true; } KviRegisteredUser * u = g_pRegisteredUserDataBase->findUserByName(szName); if(!u) { - if(!c->hasSwitch('q',"quiet"))c->warning(__tr2qs("User %Q not found"),&szName); + if(!c->hasSwitch('q',"quiet"))c->warning(__tr2qs_ctx("User %Q not found","register"),&szName); } else { u->setProperty(szProperty,szValue); if(c->hasSwitch('n',"restartnotifylists"))g_pApp->restartNotifyLists(); @@ -798,7 +798,7 @@ static bool reguser_kvs_cmd_showlist(KviKvsModuleCommandCall * c) KVSM_PARAMETERS_END(c) KviIrcMask mask(szMask); - c->window()->outputNoFmt(KVI_OUT_SYSTEMMESSAGE,__tr2qs("Registered users database dump:")); + c->window()->outputNoFmt(KVI_OUT_SYSTEMMESSAGE,__tr2qs_ctx("Registered users database dump:","register")); int count = 0; @@ -809,15 +809,15 @@ static bool reguser_kvs_cmd_showlist(KviKvsModuleCommandCall * c) KviPointerList<KviIrcMask> * ml = u->maskList(); if(u->matches(mask) || (ml->count() == 0)) { - c->window()->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs(" User: %c%Q"),KVI_TEXT_BOLD,&(u->name())); + c->window()->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs_ctx(" User: %c%Q","register"),KVI_TEXT_BOLD,&(u->name())); if(ml->count() == 0) { - c->window()->output(KVI_OUT_SYSTEMWARNING,__tr2qs(" Warning: this user has no registration masks")); + c->window()->output(KVI_OUT_SYSTEMWARNING,__tr2qs_ctx(" Warning: this user has no registration masks","register")); } else { for(KviIrcMask * m = ml->first();m;m = ml->next()) { - c->window()->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs(" Mask: %Q!%Q@%Q"),&(m->nick()),&(m->user()),&(m->host())); + c->window()->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs_ctx(" Mask: %Q!%Q@%Q","register"),&(m->nick()),&(m->user()),&(m->host())); } } @@ -828,16 +828,16 @@ static bool reguser_kvs_cmd_showlist(KviKvsModuleCommandCall * c) while(pdit.current()) { QString key = pdit.currentKey(); - c->window()->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs(" Property: %Q=%Q"),&(key),pdit.current()); + c->window()->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs_ctx(" Property: %Q=%Q","register"),&(key),pdit.current()); ++pdit; } - } else c->window()->outputNoFmt(KVI_OUT_SYSTEMMESSAGE,__tr2qs(" No properties")); + } else c->window()->outputNoFmt(KVI_OUT_SYSTEMMESSAGE,__tr2qs_ctx(" No properties","register")); count++; } ++it; } - c->window()->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs("Total: %d matching users (of %d in the database)"),count,d->count()); + c->window()->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs_ctx("Total: %d matching users (of %d in the database)","register"),count,d->count()); return true; } diff --git a/src/modules/reguser/wizard.cpp b/src/modules/reguser/wizard.cpp index 0eda4b26b..a21f7985c 100644 --- a/src/modules/reguser/wizard.cpp +++ b/src/modules/reguser/wizard.cpp @@ -74,7 +74,7 @@ KviRegistrationWizard::KviRegistrationWizard(const QString &startMask,KviRegiste QFrame * f; // resize( 490, 456 ); - setWindowTitle(__tr2qs("User Registration Wizard - KVIrc")); + setWindowTitle(__tr2qs_ctx("User Registration Wizard - KVIrc","register")); setWindowIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_LINUX))); setSizeGripEnabled( TRUE ); @@ -85,7 +85,7 @@ KviRegistrationWizard::KviRegistrationWizard(const QString &startMask,KviRegiste m_pPage1Layout->setMargin(8); m_pLabel1 = new QLabel(m_pPage1); - m_pLabel1->setText(__tr2qs("<p>Welcome to the user registration wizard.<br>This process allows you to add an IRC user to the database and set properties for that user. KVIrc will be (hopefully) able to recognize the user, add him to the notify list, and display the associated avatar.<br><br>First of all, you must insert an <b>entry name or real name</b> for the user you're going to register. The name will be used to identify the database entry and has no specific requirements, it can be a given name, nickname, or just some text to remind you of the real person.<br>Examples: \"George W Bush\", \"Dubya\".\n</p>" )); + m_pLabel1->setText(__tr2qs_ctx("<p>Welcome to the user registration wizard.<br>This process allows you to add an IRC user to the database and set properties for that user. KVIrc will be (hopefully) able to recognize the user, add him to the notify list, and display the associated avatar.<br><br>First of all, you must insert an <b>entry name or real name</b> for the user you're going to register. The name will be used to identify the database entry and has no specific requirements, it can be a given name, nickname, or just some text to remind you of the real person.<br>Examples: \"George W Bush\", \"Dubya\".\n</p>","register")); m_pLabel1->setWordWrap(true); m_pPage1Layout->addWidget(m_pLabel1, 0, 0); @@ -94,7 +94,7 @@ KviRegistrationWizard::KviRegistrationWizard(const QString &startMask,KviRegiste //m_pEditRealName->setAlignment(int(QLineEdit::AlignHCenter)); m_pPage1Layout->addWidget(m_pEditRealName,1,0); - addPage( m_pPage1,__tr2qs("Step 1: Entry Name")); + addPage( m_pPage1,__tr2qs_ctx("Step 1: Entry Name","register")); if(mask.nick() != "*")m_pEditRealName->setText(mask.nick()); @@ -109,7 +109,7 @@ KviRegistrationWizard::KviRegistrationWizard(const QString &startMask,KviRegiste m_pPage2Layout->setMargin( 8 ); m_pLabel2 = new QLabel( m_pPage2); - m_pLabel2->setText(__tr2qs("<p>A registered user is identified by one or more <b>IRC masks</b>.<br>A mask must be in the following form:<br><b>nickname!username@hostname</b><br>and can contain wildcard characters '*' and '?'. Be careful in choosing the masks, as they are the only way to verify the identity of a registered user.<br><br>You can enter at most two masks here, if you wish to add more masks, use the \"<b>Edit</b>\" button in the Registered Users dialog. You must enter at least one mask.</p>")); + m_pLabel2->setText(__tr2qs_ctx("<p>A registered user is identified by one or more <b>IRC masks</b>.<br>A mask must be in the following form:<br><b>nickname!username@hostname</b><br>and can contain wildcard characters '*' and '?'. Be careful in choosing the masks, as they are the only way to verify the identity of a registered user.<br><br>You can enter at most two masks here, if you wish to add more masks, use the \"<b>Edit</b>\" button in the Registered Users dialog. You must enter at least one mask.</p>","register")); m_pLabel2->setWordWrap(true); m_pPage2Layout->addWidget(m_pLabel2,0,0,1,5); @@ -168,7 +168,7 @@ KviRegistrationWizard::KviRegistrationWizard(const QString &startMask,KviRegiste TextLabel10_3_2->setAlignment(Qt::AlignCenter); m_pPage2Layout->addWidget(TextLabel10_3_2,2,3); - addPage(m_pPage2,__tr2qs("Step 2: Mask Selection")); + addPage(m_pPage2,__tr2qs_ctx("Step 2: Mask Selection","register")); @@ -180,7 +180,7 @@ KviRegistrationWizard::KviRegistrationWizard(const QString &startMask,KviRegiste m_pPage3Layout->setMargin(8); m_pLabel3 = new QLabel(m_pPage3); - m_pLabel3->setText(__tr2qs("<p>If you want to store an avatar image for this user, you can set it here. KVIrc will show the avatar in the userlist next to the user's nickname.<br>An avatar can be in any supported image format (PNG is recommended). Keep in mind that KVIrc stores avatars in memory and has to resize them to fit in the userlist, thus it's better to use small, low-resolution images.</p>")); + m_pLabel3->setText(__tr2qs_ctx("<p>If you want to store an avatar image for this user, you can set it here. KVIrc will show the avatar in the userlist next to the user's nickname.<br>An avatar can be in any supported image format (PNG is recommended). Keep in mind that KVIrc stores avatars in memory and has to resize them to fit in the userlist, thus it's better to use small, low-resolution images.</p>","register")); m_pLabel3->setWordWrap(true); m_pPage3Layout->addWidget(m_pLabel3,0,0); @@ -189,12 +189,12 @@ KviRegistrationWizard::KviRegistrationWizard(const QString &startMask,KviRegiste m_pPage3Layout->addWidget(f,1,0); m_pAvatar = new KviPixmap(); - m_pAvatarSelector = new KviPixmapSelector(m_pPage3,__tr2qs("Store an avatar for this user"),m_pAvatar,true); + m_pAvatarSelector = new KviPixmapSelector(m_pPage3,__tr2qs_ctx("Store an avatar for this user","register"),m_pAvatar,true); m_pPage3Layout->addWidget(m_pAvatarSelector,2,0); m_pPage3Layout->setRowStretch(0,1); - addPage(m_pPage3,__tr2qs( "Step 3: Avatar Selection")); + addPage(m_pPage3,__tr2qs_ctx("Step 3: Avatar Selection","register")); @@ -205,7 +205,7 @@ KviRegistrationWizard::KviRegistrationWizard(const QString &startMask,KviRegiste m_pPage4Layout->setMargin(8); m_pLabel4 = new QLabel(m_pPage4); - m_pLabel4->setText(__tr2qs("<p>If you want to be notified when this user is online or goes offline, you must specify the list of nicknames that KVIrc will look for.<br><br>You can enter at most two nicknames here, if you wish to add more nicknames, use the \"<b>Edit</b>\" button in the Registered Users dialog.</p>")); + m_pLabel4->setText(__tr2qs_ctx("<p>If you want to be notified when this user is online or goes offline, you must specify the list of nicknames that KVIrc will look for.<br><br>You can enter at most two nicknames here, if you wish to add more nicknames, use the \"<b>Edit</b>\" button in the Registered Users dialog.</p>","register")); m_pLabel4->setWordWrap(true); m_pPage4Layout->addWidget(m_pLabel4,0,0,1,2); @@ -215,17 +215,17 @@ KviRegistrationWizard::KviRegistrationWizard(const QString &startMask,KviRegiste m_pPage4Layout->addWidget(f,1,0,1,2); m_pNotifyCheck = new QCheckBox(m_pPage4); - m_pNotifyCheck->setText(__tr2qs("Add this user to the notify list")); + m_pNotifyCheck->setText(__tr2qs_ctx("Add this user to the notify list","register")); m_pNotifyCheck->setChecked(false); connect(m_pNotifyCheck,SIGNAL(toggled(bool)),this,SLOT(notifyCheckToggled(bool))); m_pPage4Layout->addWidget(m_pNotifyCheck,2,0,1,2); m_pNotifyNickLabel1 = new QLabel(m_pPage4); - m_pNotifyNickLabel1->setText(__tr2qs("Nickname:")); + m_pNotifyNickLabel1->setText(__tr2qs_ctx("Nickname:","register")); m_pPage4Layout->addWidget(m_pNotifyNickLabel1,3,0); m_pNotifyNickLabel2 = new QLabel(m_pPage4); - m_pNotifyNickLabel2->setText(__tr2qs("Nickname 2:")); + m_pNotifyNickLabel2->setText(__tr2qs_ctx("Nickname 2:","register")); m_pPage4Layout->addWidget(m_pNotifyNickLabel2,4,0); m_pNotifyNickEdit1 = new QLineEdit(m_pPage4); @@ -239,7 +239,7 @@ KviRegistrationWizard::KviRegistrationWizard(const QString &startMask,KviRegiste m_pPage4Layout->setRowStretch(0,1); - addPage(m_pPage4,__tr2qs("Step 4: Notify List")); + addPage(m_pPage4,__tr2qs_ctx("Step 4: Notify List","register")); @@ -251,11 +251,11 @@ KviRegistrationWizard::KviRegistrationWizard(const QString &startMask,KviRegiste m_pPage5Layout->setMargin(8); m_pTextLabel5 = new QLabel(m_pPage5); - m_pTextLabel5->setText(__tr2qs("<p>That's it. The user registration has been completed.<br><br>Click \"<b>Finish</b>\" to close this dialog.</p>")); + m_pTextLabel5->setText(__tr2qs_ctx("<p>That's it. The user registration has been completed.<br><br>Click \"<b>Finish</b>\" to close this dialog.</p>","register")); m_pTextLabel5->setWordWrap(true); m_pPage5Layout->addWidget(m_pTextLabel5,0,0); - addPage(m_pPage5,__tr2qs("Registration Complete")); + addPage(m_pPage5,__tr2qs_ctx("Registration Complete","register")); setFinishEnabled(m_pPage5,true); QString dummy; |
