aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Elvio Basello2009-01-27 17:45:18 +0000
committerGravatar Elvio Basello2009-01-27 17:45:18 +0000
commit4814a1dc4bbce2c15e7a83f13f78aad814cf0f7f (patch)
tree1e8c41d6841cc666d1324965d7627bf630c6a857 /src
parentupdated italian translation; fixed typo (diff)
downloadKVIrc-4814a1dc4bbce2c15e7a83f13f78aad814cf0f7f.tar.gz
KVIrc-4814a1dc4bbce2c15e7a83f13f78aad814cf0f7f.tar.bz2
KVIrc-4814a1dc4bbce2c15e7a83f13f78aad814cf0f7f.zip
first part of modules .pot fix
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@3045 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src')
-rw-r--r--src/modules/actioneditor/actioneditor.cpp136
-rw-r--r--src/modules/aliaseditor/aliaseditor.cpp151
-rw-r--r--src/modules/codetester/codetester.cpp6
-rw-r--r--src/modules/editor/scripteditor.cpp43
-rw-r--r--src/modules/eventeditor/eventeditor.cpp42
-rw-r--r--src/modules/popupeditor/popupeditor.cpp175
-rw-r--r--src/modules/toolbareditor/libkvitoolbareditor.cpp1
-rw-r--r--src/modules/toolbareditor/toolbareditor.cpp76
8 files changed, 302 insertions, 328 deletions
diff --git a/src/modules/actioneditor/actioneditor.cpp b/src/modules/actioneditor/actioneditor.cpp
index a1660f2b0..a9cf3f896 100644
--- a/src/modules/actioneditor/actioneditor.cpp
+++ b/src/modules/actioneditor/actioneditor.cpp
@@ -100,17 +100,17 @@ KviSingleActionEditor::KviSingleActionEditor(QWidget * par,KviActionEditor * ed)
QGridLayout * g = new QGridLayout(this);
- QLabel * l = new QLabel(__tr2qs("Name:"),this);
+ QLabel * l = new QLabel(__tr2qs_ctx("Name:","editor"),this);
g->addWidget(l,0,0);
m_pNameEdit = new QLineEdit(this);
g->addWidget(m_pNameEdit,0,1);
- m_pNameEdit->setToolTip(__tr2qs("Internal unique name for the action"));
+ m_pNameEdit->setToolTip(__tr2qs_ctx("Internal unique name for the action","editor"));
- l = new QLabel(__tr2qs("Label:"),this);
+ l = new QLabel(__tr2qs_ctx("Label:","editor"),this);
g->addWidget(l,1,0);
m_pVisibleNameEdit = new QLineEdit(this);
g->addWidget(m_pVisibleNameEdit,1,1);
- m_pVisibleNameEdit->setToolTip(__tr2qs("Visible name for this action.<br>This string will be displayed to the user so it is a good idea to use $tr() here"));
+ m_pVisibleNameEdit->setToolTip(__tr2qs_ctx("Visible name for this action.<br>This string will be displayed to the user so it is a good idea to use $tr() here","editor"));
QTabWidget * tw = new QTabWidget(this);
@@ -123,29 +123,29 @@ KviSingleActionEditor::KviSingleActionEditor(QWidget * par,KviActionEditor * ed)
m_pScriptEditor = KviScriptEditor::createInstance(tab);
gl->addWidget(m_pScriptEditor,0,0);
- m_pScriptEditor->setToolTip(__tr2qs("Action code"));
+ m_pScriptEditor->setToolTip(__tr2qs_ctx("Action code","editor"));
- tw->addTab(tab,__tr2qs("Code"));
+ tw->addTab(tab,__tr2qs_ctx("Code","editor"));
// properties tab
tab = new QWidget(tw);
gl = new QGridLayout(tab);
- l = new QLabel(__tr2qs("Category:"),tab);
+ l = new QLabel(__tr2qs_ctx("Category:","editor"),tab);
gl->addWidget(l,0,0);
m_pCategoryCombo = new QComboBox(tab);
gl->addWidget(m_pCategoryCombo,0,1,1,3);
//gl->addMultiCellWidget(m_pCategoryCombo,0,0,1,3);
- m_pCategoryCombo->setToolTip(__tr2qs("Choose the category that best fits for this action"));
+ m_pCategoryCombo->setToolTip(__tr2qs_ctx("Choose the category that best fits for this action","editor"));
- l = new QLabel(__tr2qs("Description:"),tab);
+ l = new QLabel(__tr2qs_ctx("Description:","editor"),tab);
gl->addWidget(l,1,0);
m_pDescriptionEdit = new QLineEdit(tab);
gl->addWidget(m_pDescriptionEdit,1,1,1,3);
// gl->addMultiCellWidget(m_pDescriptionEdit,1,1,1,3);
- m_pDescriptionEdit->setToolTip(__tr2qs("Visible short description for this action.<br>This string will be displayed to the user so it is a good idea to use $tr() here"));
+ m_pDescriptionEdit->setToolTip(__tr2qs_ctx("Visible short description for this action.<br>This string will be displayed to the user so it is a good idea to use $tr() here","editor"));
- l = new QLabel(__tr2qs("Small Icon:"),tab);
+ l = new QLabel(__tr2qs_ctx("Small Icon:","editor"),tab);
gl->addWidget(l,2,0);
m_pSmallIconEdit = new QLineEdit(tab);
gl->addWidget(m_pSmallIconEdit,2,1);
@@ -153,13 +153,13 @@ KviSingleActionEditor::KviSingleActionEditor(QWidget * par,KviActionEditor * ed)
m_pSmallIconButton->setMinimumSize(QSize(20,20));
connect(m_pSmallIconButton,SIGNAL(clicked()),this,SLOT(chooseSmallIcon()));
gl->addWidget(m_pSmallIconButton,2,2);
- QString s= __tr2qs("The small icon associated to this action.<br>" \
+ QString s= __tr2qs_ctx("The small icon associated to this action.<br>" \
"It will appear at least in the popup menus when this action is inserted.<br>" \
- "It should be 16x16 pixels.");
+ "It should be 16x16 pixels.","editor");
m_pSmallIconEdit->setToolTip(s);
m_pSmallIconButton->setToolTip(s);
- l = new QLabel(__tr2qs("Big Icon:"),tab);
+ l = new QLabel(__tr2qs_ctx("Big Icon:","editor"),tab);
gl->addWidget(l,3,0);
m_pBigIconEdit = new QLineEdit(tab);
gl->addWidget(m_pBigIconEdit,3,1);
@@ -169,22 +169,22 @@ KviSingleActionEditor::KviSingleActionEditor(QWidget * par,KviActionEditor * ed)
connect(m_pBigIconButton,SIGNAL(clicked()),this,SLOT(chooseBigIcon()));
gl->addWidget(m_pBigIconButton,3,2,2,2);
// gl->addMultiCellWidget(m_pBigIconButton,3,4,2,3);
- s = __tr2qs("The big icon associated to this action.<br>" \
+ s = __tr2qs_ctx("The big icon associated to this action.<br>" \
"It will appear at least in the toolbar buttons when this action is inserted.<br>" \
- "It should be 32x32 pixels.");
+ "It should be 32x32 pixels.","editor");
m_pBigIconEdit->setToolTip(s);
m_pBigIconButton->setToolTip(s);
- l = new QLabel(__tr2qs("Key Sequence:"),tab);
+ l = new QLabel(__tr2qs_ctx("Key Sequence:","editor"),tab);
gl->addWidget(l,4,0,2,1);
// gl->addMultiCellWidget(l,4,5,0,0);
m_pKeySequenceEdit = new QLineEdit(tab);
gl->addWidget(m_pKeySequenceEdit,4,1,2,1);
// gl->addMultiCellWidget(m_pKeySequenceEdit,4,5,1,1);
- m_pKeySequenceEdit->setToolTip(__tr2qs("Optional keyboard sequence that will activate this action.<br>" \
+ m_pKeySequenceEdit->setToolTip(__tr2qs_ctx("Optional keyboard sequence that will activate this action.<br>" \
"The sequence should be expressed as a string of up to four key codes separated by commas " \
"eventually combined with the modifiers \"Ctrl\",\"Shift\",\"Alt\" and \"Meta\".<br>" \
- "Examples of such sequences are \"Ctrl+X\", \"Ctrl+Alt+Z\", \"Ctrl+X,Ctrl+C\" ..."));
+ "Examples of such sequences are \"Ctrl+X\", \"Ctrl+Alt+Z\", \"Ctrl+X,Ctrl+C\" ...","editor"));
l = new QLabel(tab);
gl->addWidget(l,6,0,1,4);
@@ -194,7 +194,7 @@ KviSingleActionEditor::KviSingleActionEditor(QWidget * par,KviActionEditor * ed)
gl->setRowStretch(6,1);
- tw->addTab(tab,__tr2qs("Properties"));
+ tw->addTab(tab,__tr2qs_ctx("Properties","editor"));
@@ -203,10 +203,10 @@ KviSingleActionEditor::KviSingleActionEditor(QWidget * par,KviActionEditor * ed)
gl = new QGridLayout(tab);
- m_pNeedsContextCheck = new QCheckBox(__tr2qs("Needs IRC Context"),tab);
+ m_pNeedsContextCheck = new QCheckBox(__tr2qs_ctx("Needs IRC Context","editor"),tab);
connect(m_pNeedsContextCheck,SIGNAL(toggled(bool)),this,SLOT(needsContextCheckToggled(bool)));
- m_pNeedsContextCheck->setToolTip(__tr2qs("Check this option if this action should be enabled only when " \
- "the active window belongs to an irc context"));
+ m_pNeedsContextCheck->setToolTip(__tr2qs_ctx("Check this option if this action should be enabled only when " \
+ "the active window belongs to an irc context","editor"));
gl->addWidget(m_pNeedsContextCheck,0,0,1,4);
@@ -214,10 +214,10 @@ KviSingleActionEditor::KviSingleActionEditor(QWidget * par,KviActionEditor * ed)
l->setMinimumWidth(40);
gl->addWidget(l,1,0);
- m_pNeedsConnectionCheck = new QCheckBox(__tr2qs("Needs IRC Connection"),tab);
+ m_pNeedsConnectionCheck = new QCheckBox(__tr2qs_ctx("Needs IRC Connection","editor"),tab);
connect(m_pNeedsConnectionCheck,SIGNAL(toggled(bool)),this,SLOT(needsConnectionCheckToggled(bool)));
- m_pNeedsConnectionCheck->setToolTip(__tr2qs("Check this option if this action should be enabled only when " \
- "the active window has an active IRC connection"));
+ m_pNeedsConnectionCheck->setToolTip(__tr2qs_ctx("Check this option if this action should be enabled only when " \
+ "the active window has an active IRC connection","editor"));
gl->addWidget(m_pNeedsConnectionCheck,1,1,1,3);
@@ -225,54 +225,54 @@ KviSingleActionEditor::KviSingleActionEditor(QWidget * par,KviActionEditor * ed)
l->setMinimumWidth(40);
gl->addWidget(l,2,1);
- m_pEnableAtLoginCheck = new QCheckBox(__tr2qs("Enable at Login"),tab);
- m_pEnableAtLoginCheck->setToolTip(__tr2qs("Check this option if this action should be enabled also during " \
- "the login operations (so when the logical IRC connection hasn't been estabilished yet)"));
+ m_pEnableAtLoginCheck = new QCheckBox(__tr2qs_ctx("Enable at Login","editor"),tab);
+ m_pEnableAtLoginCheck->setToolTip(__tr2qs_ctx("Check this option if this action should be enabled also during " \
+ "the login operations (so when the logical IRC connection hasn't been estabilished yet)","editor"));
gl->addWidget(m_pEnableAtLoginCheck,2,2,1,2);
- m_pSpecificWindowsCheck = new QCheckBox(__tr2qs("Enable Only in Specified Windows"),tab);
+ m_pSpecificWindowsCheck = new QCheckBox(__tr2qs_ctx("Enable Only in Specified Windows","editor"),tab);
connect(m_pSpecificWindowsCheck,SIGNAL(toggled(bool)),this,SLOT(specificWindowsCheckToggled(bool)));
- m_pSpecificWindowsCheck->setToolTip(__tr2qs("Check this option if this action should be enabled only when " \
- "the active window is of a specified type"));
+ m_pSpecificWindowsCheck->setToolTip(__tr2qs_ctx("Check this option if this action should be enabled only when " \
+ "the active window is of a specified type","editor"));
gl->addWidget(m_pSpecificWindowsCheck,3,0,1,4);
- m_pWindowConsoleCheck = new QCheckBox(__tr2qs("Enable in Console Windows"),tab);
- m_pWindowConsoleCheck->setToolTip(__tr2qs("Check this option if this action should be enabled only when " \
- "the active window is a console"));
+ m_pWindowConsoleCheck = new QCheckBox(__tr2qs_ctx("Enable in Console Windows","editor"),tab);
+ m_pWindowConsoleCheck->setToolTip(__tr2qs_ctx("Check this option if this action should be enabled only when " \
+ "the active window is a console","editor"));
connect(m_pWindowConsoleCheck,SIGNAL(toggled(bool)),this,SLOT(channelQueryOrConsoleWindowCheckToggled(bool)));
gl->addWidget(m_pWindowConsoleCheck,4,1,1,3);
- m_pConsoleOnlyIfUsersSelectedCheck = new QCheckBox(__tr2qs("Only If There Are Selected Users"),tab);
- m_pConsoleOnlyIfUsersSelectedCheck->setToolTip(__tr2qs("This will enable the action only if there are " \
- "selected users in the active window"));
+ m_pConsoleOnlyIfUsersSelectedCheck = new QCheckBox(__tr2qs_ctx("Only If There Are Selected Users","editor"),tab);
+ m_pConsoleOnlyIfUsersSelectedCheck->setToolTip(__tr2qs_ctx("This will enable the action only if there are " \
+ "selected users in the active window","editor"));
gl->addWidget(m_pConsoleOnlyIfUsersSelectedCheck,5,2,1,2);
- m_pWindowChannelCheck = new QCheckBox(__tr2qs("Enable in Channel Windows"),tab);
- m_pWindowChannelCheck->setToolTip(__tr2qs("Check this option if this action should be enabled only when " \
- "the active window is a channel"));
+ m_pWindowChannelCheck = new QCheckBox(__tr2qs_ctx("Enable in Channel Windows","editor"),tab);
+ m_pWindowChannelCheck->setToolTip(__tr2qs_ctx("Check this option if this action should be enabled only when " \
+ "the active window is a channel","editor"));
connect(m_pWindowChannelCheck,SIGNAL(toggled(bool)),this,SLOT(channelQueryOrConsoleWindowCheckToggled(bool)));
gl->addWidget(m_pWindowChannelCheck,6,1,1,3);
- m_pChannelOnlyIfUsersSelectedCheck = new QCheckBox(__tr2qs("Only If There Are Selected Users"),tab);
- m_pChannelOnlyIfUsersSelectedCheck->setToolTip(__tr2qs("This will enable the action only if there are " \
- "selected users in the active window"));
+ m_pChannelOnlyIfUsersSelectedCheck = new QCheckBox(__tr2qs_ctx("Only If There Are Selected Users","editor"),tab);
+ m_pChannelOnlyIfUsersSelectedCheck->setToolTip(__tr2qs_ctx("This will enable the action only if there are " \
+ "selected users in the active window","editor"));
gl->addWidget(m_pChannelOnlyIfUsersSelectedCheck,7,2,1,2);
- m_pWindowQueryCheck = new QCheckBox(__tr2qs("Enable in Query Windows"),tab);
- m_pWindowQueryCheck->setToolTip(__tr2qs("Check this option if this action should be enabled only when " \
- "the active window is a query"));
+ m_pWindowQueryCheck = new QCheckBox(__tr2qs_ctx("Enable in Query Windows","editor"),tab);
+ m_pWindowQueryCheck->setToolTip(__tr2qs_ctx("Check this option if this action should be enabled only when " \
+ "the active window is a query","editor"));
connect(m_pWindowQueryCheck,SIGNAL(toggled(bool)),this,SLOT(channelQueryOrConsoleWindowCheckToggled(bool)));
gl->addWidget(m_pWindowQueryCheck,8,1,1,3);
- m_pQueryOnlyIfUsersSelectedCheck = new QCheckBox(__tr2qs("Only If There Are Selected Users"),tab);
- m_pQueryOnlyIfUsersSelectedCheck->setToolTip(__tr2qs("This will enable the action only if there are " \
- "selected users in the active window"));
+ m_pQueryOnlyIfUsersSelectedCheck = new QCheckBox(__tr2qs_ctx("Only If There Are Selected Users","editor"),tab);
+ m_pQueryOnlyIfUsersSelectedCheck->setToolTip(__tr2qs_ctx("This will enable the action only if there are " \
+ "selected users in the active window","editor"));
gl->addWidget(m_pQueryOnlyIfUsersSelectedCheck,9,2,1,2);
- m_pWindowDccChatCheck = new QCheckBox(__tr2qs("Enable in DCC Chat Windows"),tab);
- m_pWindowDccChatCheck->setToolTip(__tr2qs("Check this option if this action should be enabled only when " \
- "the active window is a dcc chat"));
+ m_pWindowDccChatCheck = new QCheckBox(__tr2qs_ctx("Enable in DCC Chat Windows","editor"),tab);
+ m_pWindowDccChatCheck->setToolTip(__tr2qs_ctx("Check this option if this action should be enabled only when " \
+ "the active window is a dcc chat","editor"));
gl->addWidget(m_pWindowDccChatCheck,10,1,1,2);
l = new QLabel(tab);
@@ -280,7 +280,7 @@ KviSingleActionEditor::KviSingleActionEditor(QWidget * par,KviActionEditor * ed)
gl->setColumnStretch(3,1);
gl->setRowStretch(11,1);
- tw->addTab(tab,__tr2qs("Flags"));
+ tw->addTab(tab,__tr2qs_ctx("Flags","editor"));
tw->setCurrentIndex(0);
g->setRowStretch(2,1);
@@ -583,7 +583,7 @@ KviActionEditorTreeView::KviActionEditorTreeView(QWidget * pParent)
: KviTalTreeWidget(pParent)
{
setColumnCount (1);
- setHeaderLabel(__tr2qs("Action"));
+ setHeaderLabel(__tr2qs_ctx("Action","editor"));
setSelectionMode(QAbstractItemView::ExtendedSelection);
setSortingEnabled(true);
int iWidth = viewport()->width();
@@ -624,13 +624,13 @@ KviActionEditor::KviActionEditor(QWidget * par)
m_pTreeWidget->setFocusPolicy(Qt::StrongFocus);
connect(m_pTreeWidget,SIGNAL(currentItemChanged(QTreeWidgetItem *,QTreeWidgetItem *)),this,SLOT(currentItemChanged(QTreeWidgetItem *,QTreeWidgetItem *)));
- m_pNewActionButton = new QPushButton(__tr2qs("New Action"),box);
+ m_pNewActionButton = new QPushButton(__tr2qs_ctx("New Action","editor"),box);
connect(m_pNewActionButton,SIGNAL(clicked()),this,SLOT(newAction()));
- m_pDeleteActionsButton = new QPushButton(__tr2qs("Delete Actions"),box);
+ m_pDeleteActionsButton = new QPushButton(__tr2qs_ctx("Delete Actions","editor"),box);
connect(m_pDeleteActionsButton,SIGNAL(clicked()),this,SLOT(deleteActions()));
- m_pExportActionsButton = new QPushButton(__tr2qs("Export Actions..."),box);
+ m_pExportActionsButton = new QPushButton(__tr2qs_ctx("Export Actions...","editor"),box);
connect(m_pExportActionsButton,SIGNAL(clicked()),this,SLOT(exportActions()));
box->setSpacing(1);
@@ -689,7 +689,7 @@ void KviActionEditor::exportActions()
QString szFile;
- if(!KviFileDialog::askForSaveFileName(szFile,__tr2qs("Choose a Filename - KVIrc"),szName,QString(),true,true,true))return;
+ if(!KviFileDialog::askForSaveFileName(szFile,__tr2qs_ctx("Choose a Filename - KVIrc","editor"),szName,QString(),true,true,true))return;
QString szCode;
@@ -714,7 +714,7 @@ void KviActionEditor::exportActions()
if(!KviFileUtils::writeFile(szFile,szCode))
{
- QMessageBox::warning(this,__tr2qs("Write Failed - KVIrc"),__tr2qs("Unable to write to the actions file."),__tr2qs("OK"));
+ QMessageBox::warning(this,__tr2qs_ctx("Write Failed - KVIrc","editor"),__tr2qs_ctx("Unable to write to the actions file.","editor"),__tr2qs_ctx("OK","editor"));
}
}
@@ -761,9 +761,9 @@ QString KviActionEditor::nameForAutomaticAction(const QString &szTemplate)
void KviActionEditor::newAction()
{
- QString szName = nameForAutomaticAction(__tr2qs("My Action"));
- QString szVis = __tr2qs("My Action");
- QString szDes = __tr2qs("Put here a short description of your action");
+ QString szName = nameForAutomaticAction(__tr2qs_ctx("My Action","editor"));
+ QString szVis = __tr2qs_ctx("My Action","editor");
+ QString szDes = __tr2qs_ctx("Put here a short description of your action","editor");
szVis.prepend("$tr(\"");
szVis.append("\")");
@@ -796,7 +796,6 @@ bool KviActionEditor::actionExists(const QString &szName)
return false;
}
-
void KviActionEditor::currentItemChanged(QTreeWidgetItem * i,QTreeWidgetItem *)
{
if(m_pSingleActionEditor->actionData())
@@ -855,26 +854,26 @@ KviActionEditorWindow::KviActionEditorWindow(KviFrame * lpFrm)
: KviWindow(KVI_WINDOW_TYPE_SCRIPTEDITOR,lpFrm,"actioneditor",0)
{
g_pActionEditorWindow = this;
- setFixedCaption(__tr2qs("Action Editor"));
+ setFixedCaption(__tr2qs_ctx("Action Editor","editor"));
m_pEditor = new KviActionEditor(this);
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);
btn->setMinimumWidth(80);
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);
btn->setMinimumWidth(80);
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);
btn->setMinimumWidth(80);
connect(btn,SIGNAL(clicked()),this,SLOT(cancelClicked()));
btn->setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DISCARD)));
@@ -922,7 +921,6 @@ void KviActionEditorWindow::getConfigGroupName(QString &szName)
szName = "actioneditor";
}
-
void KviActionEditorWindow::saveProperties(KviConfig *cfg)
{
KviWindow::saveProperties(cfg);
diff --git a/src/modules/aliaseditor/aliaseditor.cpp b/src/modules/aliaseditor/aliaseditor.cpp
index e1949ae03..cc065c953 100644
--- a/src/modules/aliaseditor/aliaseditor.cpp
+++ b/src/modules/aliaseditor/aliaseditor.cpp
@@ -23,11 +23,8 @@
//=============================================================================
-
#include "aliaseditor.h"
-
-
#include "kvi_iconmanager.h"
#include "kvi_options.h"
#include "kvi_locale.h"
@@ -218,7 +215,7 @@ KviAliasEditorTreeWidget::KviAliasEditorTreeWidget(QWidget * par)
: QTreeWidget(par)
{
setColumnCount (1);
- setHeaderLabel(__tr2qs("Alias"));
+ setHeaderLabel(__tr2qs_ctx("Alias","editor"));
setSelectionMode(QAbstractItemView::ExtendedSelection);
setSortingEnabled(true);
setRootIsDecorated(true);
@@ -258,12 +255,12 @@ KviAliasEditor::KviAliasEditor(QWidget * par)
KviTalHBox * hbox = new KviTalHBox(box);
hbox->setSpacing(0);
hbox->setMargin(0);
- m_pNameLabel = new QLabel(__tr2qs("No item selected"),hbox);
- m_pRenameButton = new QPushButton(__tr2qs("Rename"),hbox);
+ m_pNameLabel = new QLabel(__tr2qs_ctx("No item selected","editor"),hbox);
+ m_pRenameButton = new QPushButton(__tr2qs_ctx("Rename","editor"),hbox);
m_pRenameButton->setEnabled(false);
connect(m_pRenameButton,SIGNAL(clicked()),this,SLOT(renameItem()));
hbox->setStretchFactor(m_pNameLabel,2);
- m_pRenameButton->setToolTip(__tr2qs("Edit the alias or namespace name"));
+ m_pRenameButton->setToolTip(__tr2qs_ctx("Edit the alias or namespace name","editor"));
m_pEditor = KviScriptEditor::createInstance(box);
m_pEditor->setFocus();
connect(m_pEditor,SIGNAL(find(const QString &)),this,SLOT(slotFindWord(const QString &)));
@@ -450,9 +447,9 @@ void KviAliasEditor::itemRenamed(QTreeWidgetItem *it,int col)
QString szNam = buildFullItemName((KviAliasEditorTreeWidgetItem *)it);
QString szLabelText;
if(((KviAliasEditorTreeWidgetItem *)it)->isNamespace())
- szLabelText = __tr2qs("Namespace");
+ szLabelText = __tr2qs_ctx("Namespace","editor");
else
- szLabelText = __tr2qs("Alias");
+ szLabelText = __tr2qs_ctx("Alias","editor");
szLabelText += ": <b>";
szLabelText += szNam;
szLabelText += "</b>";
@@ -518,12 +515,12 @@ void KviAliasEditor::itemPressed(QTreeWidgetItem *it,QPoint pnt)
m_pContextPopup->insertItem(
*(g_pIconManager->getSmallIcon(KVI_SMALLICON_ALIAS)),
- __tr2qs("Add Alias"),
+ __tr2qs_ctx("Add Alias","editor"),
this,SLOT(newAlias()));
m_pContextPopup->insertItem(
*(g_pIconManager->getSmallIcon(KVI_SMALLICON_ALIAS)),
- __tr2qs("Add Namespace"),
+ __tr2qs_ctx("Add Namespace","editor"),
this,SLOT(newNamespace()));
bool bHasItems = m_pTreeWidget->topLevelItemCount();
@@ -533,7 +530,7 @@ void KviAliasEditor::itemPressed(QTreeWidgetItem *it,QPoint pnt)
id = m_pContextPopup->insertItem(
*(g_pIconManager->getSmallIcon(KVI_SMALLICON_QUIT)),
- __tr2qs("Remove Selected"),
+ __tr2qs_ctx("Remove Selected","editor"),
this,SLOT(removeSelectedItems()));
m_pContextPopup->setItemEnabled(id,bHasSelected);
@@ -541,20 +538,20 @@ void KviAliasEditor::itemPressed(QTreeWidgetItem *it,QPoint pnt)
m_pContextPopup->insertItem(
*(g_pIconManager->getSmallIcon(KVI_SMALLICON_FOLDER)),
- __tr2qs("Export Selected..."),
+ __tr2qs_ctx("Export Selected...","editor"),
this,SLOT(exportSelected()));
m_pContextPopup->setItemEnabled(id,bHasSelected);
m_pContextPopup->insertItem(
*(g_pIconManager->getSmallIcon(KVI_SMALLICON_FOLDER)),
- __tr2qs("Export Selected in singles files..."),
+ __tr2qs_ctx("Export Selected in singles files...","editor"),
this,SLOT(exportSelectedSepFiles()));
m_pContextPopup->setItemEnabled(id,bHasSelected);
m_pContextPopup->insertItem(
*(g_pIconManager->getSmallIcon(KVI_SMALLICON_FOLDER)),
- __tr2qs("Export All..."),
+ __tr2qs_ctx("Export All...","editor"),
this,SLOT(exportAll()));
m_pContextPopup->setItemEnabled(id,bHasItems);
@@ -562,13 +559,13 @@ void KviAliasEditor::itemPressed(QTreeWidgetItem *it,QPoint pnt)
m_pContextPopup->insertItem(
*(g_pIconManager->getSmallIcon(KVI_SMALLICON_SEARCH)),
- __tr2qs("Find In Aliases..."),
+ __tr2qs_ctx("Find In Aliases...","editor"),
this,SLOT(slotFind()));
m_pContextPopup->setItemEnabled(id,bHasItems);
m_pContextPopup->insertItem(
*(g_pIconManager->getSmallIcon(KVI_SMALLICON_NAMESPACE)),
- __tr2qs("Collapse All Namespaces"),
+ __tr2qs_ctx("Collapse All Namespaces","editor"),
this,SLOT(slotCollapseNamespaces()));
m_pContextPopup->setItemEnabled(id,bHasItems);
@@ -606,11 +603,11 @@ void KviAliasEditor::slotFind()
bool bOk;
QString szSearch = QInputDialog::getText(this,
- __tr2qs("Find In Aliases"),
- __tr2qs("Please enter the text to be searched for. The matching aliases will be highlighted."),
- QLineEdit::Normal,
- "",
- &bOk);
+ __tr2qs_ctx("Find In Aliases","editor"),
+ __tr2qs_ctx("Please enter the text to be searched for. The matching aliases will be highlighted.","editor"),
+ QLineEdit::Normal,
+ "",
+ &bOk);
g_pAliasEditorModule->unlock();
@@ -713,13 +710,13 @@ void KviAliasEditor::exportSelectionInSinglesFiles(KviPointerList<KviAliasTreeWi
if (!l->first())
{
g_pAliasEditorModule->lock();
- QMessageBox::warning(this,__tr2qs("Alias Export"),__tr2qs("There is no selection!"),__tr2qs("Ok"));
+ QMessageBox::warning(this,__tr2qs_ctx("Alias Export","editor"),__tr2qs_ctx("There is no selection!","editor"),__tr2qs_ctx("Ok","editor"));
g_pAliasEditorModule->unlock();
return;
}
g_pAliasEditorModule->lock();
- if(!KviFileDialog::askForDirectoryName(m_szDir,__tr2qs("Choose a Directory - KVIrc"),m_szDir)){
+ if(!KviFileDialog::askForDirectoryName(m_szDir,__tr2qs_ctx("Choose a Directory - KVIrc","editor"),m_szDir)){
g_pAliasEditorModule->unlock();
return;
}
@@ -740,8 +737,8 @@ void KviAliasEditor::exportSelectionInSinglesFiles(KviPointerList<KviAliasTreeWi
if (KviFileUtils::fileExists(szCompletePath) && !bReplaceAll)
{
QString szMsg;
- KviQString::sprintf(szMsg,__tr2qs("The file \"%Q\" exists. Do you want to replace it ?"),&szFileName);
- int ret = QMessageBox::question(this,__tr2qs("Replace file"),szMsg,__tr2qs("Yes"),__tr2qs("Yes to All"),__tr2qs("No"));
+ KviQString::sprintf(szMsg,__tr2qs_ctx("The file \"%Q\" exists. Do you want to replace it ?","editor"),&szFileName);
+ int ret = QMessageBox::question(this,__tr2qs_ctx("Replace file","editor"),szMsg,__tr2qs_ctx("Yes","editor"),__tr2qs_ctx("Yes to All","editor"),__tr2qs_ctx("No","editor"));
if (ret!=2){
KviFileUtils::writeFile(szCompletePath,tmp);
if (ret==1) bReplaceAll=true;
@@ -787,7 +784,7 @@ void KviAliasEditor::exportAliases(bool bSelectedOnly,bool bSingleFiles)
if(out.isEmpty())
{
g_pAliasEditorModule->lock();
- QMessageBox::warning(this,__tr2qs("Alias Export"),__tr2qs("The exported file would be empty: cowardly refusing to write it"),__tr2qs("Ok"));
+ QMessageBox::warning(this,__tr2qs_ctx("Alias Export","editor"),__tr2qs_ctx("The exported file would be empty: cowardly refusing to write it","editor"),__tr2qs_ctx("Ok","editor"));
g_pAliasEditorModule->unlock();
return;
}
@@ -806,7 +803,7 @@ void KviAliasEditor::exportAliases(bool bSelectedOnly,bool bSingleFiles)
else szNameFile="aliases";
szName += szNameFile;
szName += ".kvs";
- if(!KviFileDialog::askForSaveFileName(szFile,__tr2qs("Choose a Filename - KVIrc"),szName,"*.kvs",false,true,true))
+ if(!KviFileDialog::askForSaveFileName(szFile,__tr2qs_ctx("Choose a Filename - KVIrc","editor"),szName,"*.kvs",false,true,true))
{
g_pAliasEditorModule->unlock();
return;
@@ -817,7 +814,7 @@ void KviAliasEditor::exportAliases(bool bSelectedOnly,bool bSingleFiles)
if(!KviFileUtils::writeFile(szFile,out))
{
g_pAliasEditorModule->lock();
- QMessageBox::warning(this,__tr2qs("Write Failed - KVIrc"),__tr2qs("Unable to write to the alias file."),__tr2qs("Ok"));
+ QMessageBox::warning(this,__tr2qs_ctx("Write Failed - KVIrc","editor"),__tr2qs_ctx("Unable to write to the alias file.","editor"),__tr2qs_ctx("Ok","editor"));
g_pAliasEditorModule->unlock();
}
}
@@ -843,6 +840,7 @@ void KviAliasEditor::loadProperties(KviConfig *cfg)
if(!it)it = findNamespaceItem(tmp);
if(it)activateItem(it);
}
+
void KviAliasEditor::appendAliasItems(KviPointerList<KviAliasTreeWidgetItem> * l,bool bSelectedOnly)
{
for (int i=0;i<m_pTreeWidget->topLevelItemCount();i++)
@@ -874,6 +872,7 @@ void KviAliasEditor::appendAliasItems(KviPointerList<KviAliasTreeWidgetItem> * l
}
}
+
void KviAliasEditor::appendAliasItemsRecursive(KviPointerList<KviAliasTreeWidgetItem> * l,QTreeWidgetItem * pStartFrom,bool bSelectedOnly)
{
for (int i=0;i<pStartFrom->childCount();i++)
@@ -906,7 +905,6 @@ void KviAliasEditor::appendAliasItemsRecursive(KviPointerList<KviAliasTreeWidget
}
-
void KviAliasEditor::appendNamespaceItems(KviPointerList<KviAliasTreeWidgetItem> * l,bool bSelectedOnly)
{
for (int i=0;i<m_pTreeWidget->topLevelItemCount();i++)
@@ -938,6 +936,7 @@ void KviAliasEditor::appendNamespaceItems(KviPointerList<KviAliasTreeWidgetItem>
}
}
+
void KviAliasEditor::appendNamespaceItemsRecursive(KviPointerList<KviAliasTreeWidgetItem> * l,QTreeWidgetItem * pStartFrom,bool bSelectedOnly)
{
for (int i=0;i<pStartFrom->childCount();i++)
@@ -986,6 +985,7 @@ void KviAliasEditor::appendSelectedItemsRecursive(KviPointerList<KviAliasEditorT
}
}
}
+
void KviAliasEditor::appendSelectedItems(KviPointerList<KviAliasEditorTreeWidgetItem> * l)
{
for (int i=0;i<m_pTreeWidget->topLevelItemCount();i++)
@@ -1010,6 +1010,7 @@ void KviAliasEditor::removeItemChildren(KviAliasEditorTreeWidgetItem *it)
delete it->child(i);
}
}
+
bool KviAliasEditor::removeItem(KviAliasEditorTreeWidgetItem *it,bool * pbYesToAll,bool)
{
if(!it)return true;
@@ -1019,15 +1020,15 @@ bool KviAliasEditor::removeItem(KviAliasEditorTreeWidgetItem *it,bool * pbYesToA
if(!*pbYesToAll)
{
if(it->isAlias())
- KviQString::sprintf(szMsg,__tr2qs("Do you really want to remove the alias \"%Q\" ?"),&szName);
+ KviQString::sprintf(szMsg,__tr2qs_ctx("Do you really want to remove the alias \"%Q\" ?","editor"),&szName);
else {
- KviQString::sprintf(szMsg,__tr2qs("Do you really want to remove the namespace \"%Q\" ?"),&szName);
+ KviQString::sprintf(szMsg,__tr2qs_ctx("Do you really want to remove the namespace \"%Q\" ?","editor"),&szName);
szMsg += "<br>";
- szMsg += __tr2qs("Please note that all the children items will be deleted too.");
+ szMsg += __tr2qs_ctx("Please note that all the children items will be deleted too.","editor");
}
g_pAliasEditorModule->lock();
- int ret = QMessageBox::question(this,__tr2qs("Remove item"),szMsg,__tr2qs("Yes"),__tr2qs("Yes to All"),__tr2qs("No"));
+ int ret = QMessageBox::question(this,__tr2qs_ctx("Remove item","editor"),szMsg,__tr2qs_ctx("Yes","editor"),__tr2qs_ctx("Yes to All","editor"),__tr2qs_ctx("No","editor"));
g_pAliasEditorModule->unlock();
switch(ret)
{
@@ -1106,9 +1107,9 @@ QString KviAliasEditor::askForAliasName(const QString &szAction,const QString &s
{
g_pAliasEditorModule->lock();
QMessageBox::warning(this,
- __tr2qs("Missing Alias Name"),
- __tr2qs("You must specify a valid name for the alias"),
- __tr2qs("Ok, Let me try again..."));
+ __tr2qs_ctx("Missing Alias Name","editor"),
+ __tr2qs_ctx("You must specify a valid name for the alias","editor"),
+ __tr2qs_ctx("Ok, Let me try again...","editor"));
g_pAliasEditorModule->unlock();
continue;
}
@@ -1119,9 +1120,9 @@ QString KviAliasEditor::askForAliasName(const QString &szAction,const QString &s
{
g_pAliasEditorModule->lock();
QMessageBox::information(this,
- __tr2qs("Bad Alias Name"),
- __tr2qs("Alias names can contain only letters, digits, underscores and '::' namespace separators"),
- __tr2qs("Ok, Let me try again..."));
+ __tr2qs_ctx("Bad Alias Name","editor"),
+ __tr2qs_ctx("Alias names can contain only letters, digits, underscores and '::' namespace separators","editor"),
+ __tr2qs_ctx("Ok, Let me try again...","editor"));
g_pAliasEditorModule->unlock();
szNewName = "";
continue;
@@ -1133,9 +1134,9 @@ QString KviAliasEditor::askForAliasName(const QString &szAction,const QString &s
{
g_pAliasEditorModule->lock();
QMessageBox::information(this,
- __tr2qs("Bad Alias Name"),
- __tr2qs("Stray ':' character in alias name: did you mean ...<namespace>::<name> ?"),
- __tr2qs("Ok, Let me try again..."));
+ __tr2qs_ctx("Bad Alias Name","editor"),
+ __tr2qs_ctx("Stray ':' character in alias name: did you mean ...<namespace>::<name> ?","editor"),
+ __tr2qs_ctx("Ok, Let me try again...","editor"));
g_pAliasEditorModule->unlock();
szNewName = "";
continue;
@@ -1144,9 +1145,9 @@ QString KviAliasEditor::askForAliasName(const QString &szAction,const QString &s
{
g_pAliasEditorModule->lock();
QMessageBox::information(this,
- __tr2qs("Bad Alias Name"),
- __tr2qs("Found an empty namespace in alias name"),
- __tr2qs("Ok, Let me try again..."));
+ __tr2qs_ctx("Bad Alias Name","editor"),
+ __tr2qs_ctx("Found an empty namespace in alias name","editor"),
+ __tr2qs_ctx("Ok, Let me try again...","editor"));
g_pAliasEditorModule->unlock();
szNewName = "";
continue;
@@ -1174,9 +1175,9 @@ QString KviAliasEditor::askForNamespaceName(const QString &szAction,const QStrin
{
g_pAliasEditorModule->lock();
QMessageBox::warning(this,
- __tr2qs("Missing Namespace Name"),
- __tr2qs("You must specify a valid name for the namespace"),
- __tr2qs("Ok, Let me try again..."));
+ __tr2qs_ctx("Missing Namespace Name","editor"),
+ __tr2qs_ctx("You must specify a valid name for the namespace","editor"),
+ __tr2qs_ctx("Ok, Let me try again...","editor"));
g_pAliasEditorModule->unlock();
continue;
}
@@ -1187,9 +1188,9 @@ QString KviAliasEditor::askForNamespaceName(const QString &szAction,const QStrin
{
g_pAliasEditorModule->lock();
QMessageBox::information(this,
- __tr2qs("Bad Namespace Name"),
- __tr2qs("Namespace names can contain only letters, digits, underscores and '::' namespace separators"),
- __tr2qs("Ok, Let me try again..."));
+ __tr2qs_ctx("Bad Namespace Name","editor"),
+ __tr2qs_ctx("Namespace names can contain only letters, digits, underscores and '::' namespace separators","editor"),
+ __tr2qs_ctx("Ok, Let me try again...","editor"));
g_pAliasEditorModule->unlock();
szNewName = "";
continue;
@@ -1201,9 +1202,9 @@ QString KviAliasEditor::askForNamespaceName(const QString &szAction,const QStrin
{
g_pAliasEditorModule->lock();
QMessageBox::information(this,
- __tr2qs("Bad Namespace Name"),
- __tr2qs("Stray ':' character in namespace name: did you mean ...<namespace>::<name> ?"),
- __tr2qs("Ok, Let me try again..."));
+ __tr2qs_ctx("Bad Namespace Name","editor"),
+ __tr2qs_ctx("Stray ':' character in namespace name: did you mean ...<namespace>::<name> ?","editor"),
+ __tr2qs_ctx("Ok, Let me try again...","editor"));
g_pAliasEditorModule->unlock();
szNewName = "";
continue;
@@ -1212,9 +1213,9 @@ QString KviAliasEditor::askForNamespaceName(const QString &szAction,const QStrin
{
g_pAliasEditorModule->lock();
QMessageBox::information(this,
- __tr2qs("Bad Namespace Name"),
- __tr2qs("Found an empty namespace in namespace name"),
- __tr2qs("Ok, Let me try again..."));
+ __tr2qs_ctx("Bad Namespace Name","editor"),
+ __tr2qs_ctx("Found an empty namespace in namespace name","editor"),
+ __tr2qs_ctx("Ok, Let me try again...","editor"));
g_pAliasEditorModule->unlock();
szNewName = "";
continue;
@@ -1247,7 +1248,7 @@ void KviAliasEditor::newAlias()
m_pLastClickedItem = m_pLastClickedItem->parentNamespaceItem();
}
- QString szNewName = askForAliasName(__tr2qs("Add Alias"),__tr2qs("Please enter the name for the new alias"),"myfunction");
+ QString szNewName = askForAliasName(__tr2qs_ctx("Add Alias","editor"),__tr2qs_ctx("Please enter the name for the new alias","editor"),"myfunction");
if(szNewName.isEmpty())return;
getUniqueItemName(m_pLastClickedItem,szNewName,KviAliasEditorTreeWidgetItem::Alias);
@@ -1272,7 +1273,7 @@ void KviAliasEditor::newNamespace()
}
- QString szNewName = askForNamespaceName(__tr2qs("Add Namespace"),__tr2qs("Please enter the name for the new namespace"),"mynamespace");
+ QString szNewName = askForNamespaceName(__tr2qs_ctx("Add Namespace","editor"),__tr2qs_ctx("Please enter the name for the new namespace","editor"),"mynamespace");
if(szNewName.isEmpty())return;
getUniqueItemName(m_pLastClickedItem,szNewName,KviAliasEditorTreeWidgetItem::Namespace);
@@ -1339,9 +1340,9 @@ void KviAliasEditor::renameItem()
bool bAlias = m_pLastEditedItem->isAlias();
if(bAlias)
- szNewName = askForAliasName(__tr2qs("Rename Alias"),__tr2qs("Please enter the new name for the alias"),szName);
+ szNewName = askForAliasName(__tr2qs_ctx("Rename Alias","editor"),__tr2qs_ctx("Please enter the new name for the alias","editor"),szName);
else
- szNewName = askForNamespaceName(__tr2qs("Rename Namespace"),__tr2qs("Please enter the new name for the namespace"),szName);
+ szNewName = askForNamespaceName(__tr2qs_ctx("Rename Namespace","editor"),__tr2qs_ctx("Please enter the new name for the namespace","editor"),szName);
if(szNewName.isEmpty())return;
if(szName == szNewName)return;
@@ -1353,9 +1354,9 @@ void KviAliasEditor::renameItem()
{
g_pAliasEditorModule->lock();
QMessageBox::information(this,
- __tr2qs("Alias already exists"),
- __tr2qs("This name is already in use. Please choose another one."),
- __tr2qs("Ok, Let me try again..."));
+ __tr2qs_ctx("Alias already exists","editor"),
+ __tr2qs_ctx("This name is already in use. Please choose another one.","editor"),
+ __tr2qs_ctx("Ok, Let me try again...","editor"));
g_pAliasEditorModule->unlock();
return;
}
@@ -1365,9 +1366,9 @@ void KviAliasEditor::renameItem()
{
g_pAliasEditorModule->lock();
QMessageBox::information(this,
- __tr2qs("Namespace already exists"),
- __tr2qs("This name is already in use. Please choose another one."),
- __tr2qs("Ok, Let me try again..."));
+ __tr2qs_ctx("Namespace already exists","editor"),
+ __tr2qs_ctx("This name is already in use. Please choose another one.","editor"),
+ __tr2qs_ctx("Ok, Let me try again...","editor"));
g_pAliasEditorModule->unlock();
return;
}
@@ -1429,7 +1430,7 @@ void KviAliasEditor::currentItemChanged(QTreeWidgetItem *it,QTreeWidgetItem *)
if(!m_pLastEditedItem)
{
- m_pNameLabel->setText(__tr2qs("No item selected"));
+ m_pNameLabel->setText(__tr2qs_ctx("No item selected","editor"));
m_pRenameButton->setEnabled(false);
m_pEditor->setText("");
m_pEditor->setEnabled(false);
@@ -1439,7 +1440,7 @@ void KviAliasEditor::currentItemChanged(QTreeWidgetItem *it,QTreeWidgetItem *)
QString szNam = buildFullItemName(m_pLastEditedItem);
if(m_pLastEditedItem->isNamespace())
{
- QString szLabelText = __tr2qs("Namespace");
+ QString szLabelText = __tr2qs_ctx("Namespace","editor");
szLabelText += ": <b>";
szLabelText += szNam;
szLabelText += "</b>";
@@ -1450,7 +1451,7 @@ void KviAliasEditor::currentItemChanged(QTreeWidgetItem *it,QTreeWidgetItem *)
return;
}
- QString szLabelText = __tr2qs("Alias");
+ QString szLabelText = __tr2qs_ctx("Alias","editor");
szLabelText += ": <b>";
szLabelText += szNam;
szLabelText += "</b>";
@@ -1549,24 +1550,24 @@ KviAliasEditorWindow::KviAliasEditorWindow(KviFrame * lpFrm)
{
g_pAliasEditorWindow = this;
- setFixedCaption(__tr2qs("Alias Editor"));
+ setFixedCaption(__tr2qs_ctx("Alias Editor","editor"));
m_pEditor = new KviAliasEditor(this);
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);
diff --git a/src/modules/codetester/codetester.cpp b/src/modules/codetester/codetester.cpp
index ddc677a38..7d5e6832a 100644
--- a/src/modules/codetester/codetester.cpp
+++ b/src/modules/codetester/codetester.cpp
@@ -54,11 +54,11 @@ KviCodeTester::KviCodeTester(QWidget * par)
m_pEditor = KviScriptEditor::createInstance(this);
g->addWidget(m_pEditor,0,0,1,4);
//g->addMultiCellWidget(m_pEditor,0,0,0,3);
- m_pExecuteButton = new QPushButton(__tr2qs("&Execute"),this);
+ m_pExecuteButton = new QPushButton(__tr2qs_ctx("&Execute","editor"),this);
g->addWidget(m_pExecuteButton,1,3);
connect(m_pExecuteButton,SIGNAL(clicked()),this,SLOT(execute()));
- m_pModeLabel = new QLabel(__tr("Params:"),this);
+ m_pModeLabel = new QLabel(__tr2qs_ctx("Params:","editor"),this);
g->addWidget(m_pModeLabel,1,1);
m_pParams = new QLineEdit(this);
g->addWidget(m_pParams,1,2);
@@ -106,7 +106,7 @@ void KviCodeTesterWindow::resizeEvent(QResizeEvent *)
void KviCodeTesterWindow::fillCaptionBuffers()
{
- m_szPlainTextCaption = __tr2qs("Script Tester");
+ m_szPlainTextCaption = __tr2qs_ctx("Script Tester","editor");
static QString p1("<nobr><font color=\"");
static QString p2("\"><b>");
diff --git a/src/modules/editor/scripteditor.cpp b/src/modules/editor/scripteditor.cpp
index e13c6106a..8af388542 100644
--- a/src/modules/editor/scripteditor.cpp
+++ b/src/modules/editor/scripteditor.cpp
@@ -120,6 +120,7 @@ KviScriptEditorWidget::~KviScriptEditorWidget()
if(m_pCompleter)
delete m_pCompleter;
}
+
void KviScriptEditorWidget::checkReadyCompleter()
{
if(bCompleterReady)
@@ -247,8 +248,6 @@ void KviScriptEditorWidget::insertCompletion(const QString & szCompletion)
setTextCursor(tc);
}
-
-
void KviScriptEditorWidget::contextMenuEvent(QContextMenuEvent * e)
{
QMenu * pMenu = createStandardContextMenu();
@@ -266,7 +265,7 @@ void KviScriptEditorWidget::slotFind()
void KviScriptEditorWidget::slotReplace()
{
- KviScriptEditorReplaceDialog * pDialog = new KviScriptEditorReplaceDialog(this,__tr("Find & Replace"));
+ KviScriptEditorReplaceDialog * pDialog = new KviScriptEditorReplaceDialog(this,__tr2qs_ctx("Find & Replace","editor"));
connect(pDialog,SIGNAL(replaceAll(const QString &,const QString &)),m_pParent,SLOT(slotReplaceAll(const QString &,const QString &)));
connect(pDialog,SIGNAL(initFind()),m_pParent,SLOT(slotInitFind()));
connect(pDialog,SIGNAL(nextFind(const QString &)),m_pParent,SLOT(slotNextFind(const QString &)));
@@ -519,7 +518,7 @@ KviScriptEditorWidgetColorOptions::KviScriptEditorWidgetColorOptions(QWidget * p
box->setSpacing(0);
KviFontSelector * f = new KviFontSelector(box,__tr2qs_ctx("Font:","editor"),&g_fntNormal,true);
m_pSelectorInterfaceList->append(f);
- KviTalGroupBox * gbox = new KviTalGroupBox(Qt::Horizontal,__tr2qs("Colors" ),box);
+ KviTalGroupBox * gbox = new KviTalGroupBox(Qt::Horizontal,__tr2qs_ctx("Colors","editor"),box);
gbox->setInsideSpacing(0);
KviColorSelector * s = addColorSelector(gbox,__tr2qs_ctx("Background:","editor"),&g_clrBackground,true);
s = addColorSelector(gbox,__tr2qs_ctx("Normal text:","editor"),&g_clrNormalText,true);
@@ -533,7 +532,7 @@ KviScriptEditorWidgetColorOptions::KviScriptEditorWidgetColorOptions(QWidget * p
KviTalHBox * hbox = new KviTalHBox(box);
- QPushButton * b = new QPushButton(__tr2qs_ctx("&OK","editor"),hbox);
+ QPushButton * b = new QPushButton(__tr2qs_ctx("OK","editor"),hbox);
b->setDefault(true);
connect(b,SIGNAL(clicked()),this,SLOT(okClicked()));
@@ -602,14 +601,13 @@ KviScriptEditorSyntaxHighlighter::KviScriptEditorSyntaxHighlighter(KviScriptEdit
highlightingRules.append(rule);
commentStartExpression = QRegExp("/\\*");
- commentEndExpression = QRegExp("\\*/");
-
+ commentEndExpression = QRegExp("\\*/");
}
KviScriptEditorSyntaxHighlighter::~KviScriptEditorSyntaxHighlighter()
{
-
}
+
void KviScriptEditorSyntaxHighlighter::updateSyntaxtTextFormat()
{
punctuationFormat.setForeground(g_clrPunctuation);
@@ -634,7 +632,6 @@ void KviScriptEditorSyntaxHighlighter::updateSyntaxtTextFormat()
findFormat.setForeground(g_clrFind);
findFormat.setFont(g_fntNormal);
-
}
void KviScriptEditorSyntaxHighlighter::highlightBlock(const QString & szText)
@@ -656,12 +653,12 @@ void KviScriptEditorSyntaxHighlighter::highlightBlock(const QString & szText)
// check 'commands'
int iCommandStart=iIndexStart;
if (szText.at(iIndexStart).unicode()!='$' && szText.at(iIndexStart).unicode()!='{' && szText.at(iIndexStart).unicode()!='}' && szText.at(iIndexStart).unicode()!='%')
- {
+ {
while(iIndexStart<szText.size() && (szText.at(iIndexStart).isLetterOrNumber() || (szText.at(iIndexStart).unicode() == '.') || (szText.at(iIndexStart).unicode() == '_') || (szText.at(iIndexStart).unicode()== ':') ))
{
iIndexStart++;
}
- setFormat(iCommandStart,iIndexStart-iCommandStart,keywordFormat);
+ setFormat(iCommandStart,iIndexStart-iCommandStart,keywordFormat);
}
// code from QT4 example
@@ -671,14 +668,14 @@ void KviScriptEditorSyntaxHighlighter::highlightBlock(const QString & szText)
QRegExp expression(rule.pattern);
QString sz=expression.pattern();
- index = szText.indexOf(expression,iIndexStart);
+ index = szText.indexOf(expression,iIndexStart);
- while (index >= 0)
+ while (index >= 0)
{
int length = expression.matchedLength();
setFormat(index, length, rule.format);
index = szText.indexOf(expression, index + length);
- }
+ }
}
setCurrentBlockState(0);
@@ -757,9 +754,9 @@ KviScriptEditorImplementation::KviScriptEditorImplementation(QWidget * par)
g->setColumnStretch(2,10);
g->addWidget(m_pFindLineEdit,1,2);
- QLabel *lab= new QLabel("find",this);
- lab->setText(tr("Find"));
- g->addWidget(lab,1,1);
+ QLabel * pLab = new QLabel(this);
+ pLab->setText(__tr2qs_ctx("Find","editor"));
+ g->addWidget(pLab,1,1);
m_pRowColLabel = new QLabel("0",this);
m_pRowColLabel->setFrameStyle(QFrame::Sunken | QFrame::Panel);
@@ -986,17 +983,16 @@ KviScriptEditorReplaceDialog::KviScriptEditorReplaceDialog(QWidget * parent, con
QLabel * m_pFindLabel = new QLabel(this);
m_pFindLabel->setObjectName("findlabel");
- m_pFindLabel->setText(tr("Word to Find"));
+ m_pFindLabel->setText(__tr2qs_ctx("Word to Find","editor"));
pLayout->addWidget(m_pFindLabel,0,0);
m_pFindLineEdit = new QLineEdit(this);
m_pFindLineEdit->setObjectName("findlineedit");
pLayout->addWidget(m_pFindLineEdit,0,1);
-
QLabel * m_pReplaceLabel = new QLabel(this);
m_pReplaceLabel->setObjectName("replacelabel");
- m_pReplaceLabel->setText(tr("Replace with"));
+ m_pReplaceLabel->setText(__tr2qs_ctx("Replace with","editor"));
pLayout->addWidget(m_pReplaceLabel,1,0);
m_pReplaceLineEdit = new QLineEdit(this);
@@ -1008,17 +1004,17 @@ KviScriptEditorReplaceDialog::KviScriptEditorReplaceDialog(QWidget * parent, con
m_pCheckReplaceAll = new QCheckBox(this);
m_pCheckReplaceAll->setObjectName("replaceAll");
- m_pCheckReplaceAll->setText(tr("&Replace in all Aliases"));
+ m_pCheckReplaceAll->setText(__tr2qs_ctx("&Replace in all Aliases","editor"));
pLayout->addWidget(m_pCheckReplaceAll,2,0);
QPushButton * pCancelButton = new QPushButton(this);
pCancelButton->setObjectName("cancelButton");
- pCancelButton->setText(tr("&Cancel"));
+ pCancelButton->setText(__tr2qs_ctx("&Cancel","editor"));
pLayout->addWidget(pCancelButton,3,0);
m_pReplaceButton = new QPushButton(this);
m_pReplaceButton->setObjectName("replacebutton");
- m_pReplaceButton->setText(tr("&Replace"));
+ m_pReplaceButton->setText(__tr2qs_ctx("&Replace","editor"));
m_pReplaceButton->setEnabled(false);
pLayout->addWidget(m_pReplaceButton,3,1);
@@ -1060,4 +1056,3 @@ void KviScriptEditorReplaceDialog::slotNextFind()
{
emit nextFind(m_pFindLineEdit->text());
}
-
diff --git a/src/modules/eventeditor/eventeditor.cpp b/src/modules/eventeditor/eventeditor.cpp
index ea71b625f..6a909212e 100644
--- a/src/modules/eventeditor/eventeditor.cpp
+++ b/src/modules/eventeditor/eventeditor.cpp
@@ -102,7 +102,7 @@ KviEventEditor::KviEventEditor(QWidget * par)
m_pTreeWidget = new KviEventEditorTreeWidget(vbox);
- QPushButton * pb = new QPushButton(__tr2qs("&Export All To..."),vbox);
+ QPushButton * pb = new QPushButton(__tr2qs_ctx("&Export All To...","editor"),vbox);
connect(pb,SIGNAL(clicked()),this,SLOT(exportAllEvents()));
KviTalVBox * box = new KviTalVBox(spl);
@@ -113,7 +113,7 @@ KviEventEditor::KviEventEditor(QWidget * par)
box->setMargin(0);
m_pNameEditor = new QLineEdit(box);
- m_pNameEditor->setToolTip(__tr2qs("Edit the event handler name."));
+ m_pNameEditor->setToolTip(__tr2qs_ctx("Edit the event handler name.","editor"));
m_pEditor = KviScriptEditor::createInstance(box);
m_pEditor->setFocus();
@@ -165,7 +165,7 @@ KviEventEditorTreeWidget::KviEventEditorTreeWidget(QWidget * par)
: QTreeWidget(par)
{
setColumnCount (1);
- setHeaderLabel(__tr2qs("Event"));
+ setHeaderLabel(__tr2qs_ctx("Event","editor"));
setSelectionMode(QAbstractItemView::ExtendedSelection);
setSortingEnabled(true);
setRootIsDecorated(true);
@@ -195,24 +195,24 @@ void KviEventEditor::itemPressed(QTreeWidgetItem *it,const QPoint &pnt)
if(!(((KviEventHandlerTreeWidgetItem *)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(addHandlerForCurrentEvent()));
}
@@ -225,7 +225,7 @@ void KviEventEditor::getUniqueHandlerName(KviEventTreeWidgetItem *it,QString &bu
__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;
@@ -263,7 +263,7 @@ void KviEventEditor::addHandlerForCurrentEvent()
if(it->childCount()==0)
it->setIcon(0,QIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_EVENT))));
- QString buffer = __tr2qs("default");
+ QString buffer = __tr2qs_ctx("default","editor");
getUniqueHandlerName((KviEventTreeWidgetItem *)it,buffer);
QTreeWidgetItem * ch = new KviEventHandlerTreeWidgetItem(it,buffer,"",true);
it->setExpanded(true);
@@ -366,7 +366,7 @@ void KviEventEditor::currentItemChanged(QTreeWidgetItem * it,QTreeWidgetItem *)
if(!it)
{
- m_pNameEditor->setText(__tr2qs("No item selected"));
+ m_pNameEditor->setText(__tr2qs_ctx("No item selected","editor"));
m_pEditor->setText("");
m_pEditor->setEnabled(false);
return;
@@ -387,11 +387,11 @@ void KviEventEditor::currentItemChanged(QTreeWidgetItem * it,QTreeWidgetItem *)
m_pNameEditor->setText("");
m_pEditor->setEnabled(false);
QString parms = ((KviEventTreeWidgetItem *)it)->m_szParams;
- if(parms.isEmpty())parms = __tr2qs("none");
+ if(parms.isEmpty())parms = __tr2qs_ctx("none","editor");
KviCommandFormatter::indent(parms);
KviCommandFormatter::indent(parms);
QString tmp;
- KviQString::sprintf(tmp,__tr2qs("\n\n Event:\n %s\n\n Parameters:\n%s"),
+ KviQString::sprintf(tmp,__tr2qs_ctx("\n\nEvent:\n%s\n\nParameters:\n%s","editor"),
((KviEventTreeWidgetItem *)it)->m_szName.toUtf8().data(),parms.toUtf8().data());
m_pEditor->setText(tmp);
}
@@ -444,14 +444,14 @@ void KviEventEditor::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 event file."),__tr2qs("&OK"));
+ QMessageBox::warning(this,__tr2qs_ctx("Write Failed - KVIrc","editor"),__tr2qs_ctx("Unable to write to the event file.","editor"),__tr2qs_ctx("&OK","editor"));
}
}
@@ -485,11 +485,11 @@ void KviEventEditor::exportAllEvents()
QString szFile;
- if(!KviFileDialog::askForSaveFileName(szFile,__tr2qs("Choose a Filename - KVIrc"),szName,QString(),true,true))return;
+ if(!KviFileDialog::askForSaveFileName(szFile,__tr2qs_ctx("Choose a Filename - KVIrc","editor"),szName,QString(),true,true))return;
if(!KviFileUtils::writeFile(szFile,out))
{
- QMessageBox::warning(this,__tr2qs("Write Failed - KVIrc"),__tr2qs("Unable to write to the events file."),__tr2qs("Ok"));
+ QMessageBox::warning(this,__tr2qs_ctx("Write Failed - KVIrc","editor"),__tr2qs_ctx("Unable to write to the events file.","editor"),__tr2qs_ctx("Ok","editor"));
}
}
@@ -504,17 +504,17 @@ KviEventEditorWindow::KviEventEditorWindow(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);
@@ -558,7 +558,7 @@ void KviEventEditorWindow::resizeEvent(QResizeEvent *)
void KviEventEditorWindow::fillCaptionBuffers()
{
- m_szPlainTextCaption = __tr2qs("Event Editor");
+ m_szPlainTextCaption = __tr2qs_ctx("Event Editor","editor");
static QString p1("<nobr><font color=\"");
static QString p2("\"><b>");
diff --git a/src/modules/popupeditor/popupeditor.cpp b/src/modules/popupeditor/popupeditor.cpp
index adfebf408..259b97bce 100644
--- a/src/modules/popupeditor/popupeditor.cpp
+++ b/src/modules/popupeditor/popupeditor.cpp
@@ -76,28 +76,28 @@ void KviPopupTreeWidgetItem::init()
switch(m_type)
{
case Item:
- setText(1,__tr2qs("Item"));
+ setText(1,__tr2qs_ctx("Item","editor"));
break;
case Menu:
- setText(1,__tr2qs("Submenu"));
+ setText(1,__tr2qs_ctx("Submenu","editor"));
break;
case ExtMenu:
- setText(1,__tr2qs("External Menu"));
+ setText(1,__tr2qs_ctx("External Menu","editor"));
break;
case Separator:
setText(0,"-----------------------");
- setText(1,__tr2qs("Separator"));
+ setText(1,__tr2qs_ctx("Separator","editor"));
break;
case Label:
- setText(1,__tr2qs("Label"));
+ setText(1,__tr2qs_ctx("Label","editor"));
break;
case Epilogue:
- setText(0,__tr2qs("### Epilogue ###"));
- setText(1,__tr2qs("Epilogue"));
+ setText(0,__tr2qs_ctx("### Epilogue ###","editor"));
+ setText(1,__tr2qs_ctx("Epilogue","editor"));
break;
case Prologue:
- setText(0,__tr2qs("### Prologue ###"));
- setText(1,__tr2qs("Prologue"));
+ setText(0,__tr2qs_ctx("### Prologue ###","editor"));
+ setText(1,__tr2qs_ctx("Prologue","editor"));
break;
default:
break;
@@ -192,11 +192,11 @@ KviSinglePopupEditor::KviSinglePopupEditor(QWidget * par)
m_pNameEditor = new QLineEdit(this);
- m_pNameEditor->setToolTip(__tr2qs("Popup name"));
+ m_pNameEditor->setToolTip(__tr2qs_ctx("Popup name","editor"));
g->addWidget(m_pNameEditor,0,0,1,2);
- m_pMenuButton = new QPushButton(__tr2qs("Test"),this);
+ m_pMenuButton = new QPushButton(__tr2qs_ctx("Test","editor"),this);
g->addWidget(m_pMenuButton,0,2);
connect(m_pMenuButton,SIGNAL(clicked()),this,SLOT(testPopup()));
QSplitter * spl = new QSplitter(Qt::Vertical,this);
@@ -206,7 +206,7 @@ KviSinglePopupEditor::KviSinglePopupEditor(QWidget * par)
m_pTreeWidget = new KviTalTreeWidget(spl);
m_pTreeWidget->setColumnCount(2);
QStringList labels;
- labels << __tr2qs("Item") << __tr2qs("Type");
+ labels << __tr2qs_ctx("Item","editor") << __tr2qs_ctx("Type","editor");
m_pTreeWidget->setHeaderLabels(labels);
m_pTreeWidget->setSelectionMode(QAbstractItemView::SingleSelection);
m_pTreeWidget->setSelectionBehavior(QAbstractItemView::SelectRows);
@@ -225,49 +225,49 @@ KviSinglePopupEditor::KviSinglePopupEditor(QWidget * par)
g->addWidget(spl,1,0,1,3);
- QLabel * l = new QLabel(__tr2qs("Text:"),this);
+ QLabel * l = new QLabel(__tr2qs_ctx("Text:","editor"),this);
g->addWidget(l,2,0);
m_pTextEditor = new QLineEdit(this);
m_pTextEditor->setToolTip(
- __tr2qs("<center><b>Visible text</b><br>May contain identifiers that will be evaluated at popup call time.<br>For labels, this text can contain also limited HTML tags.</center>"));
+ __tr2qs_ctx("<center><b>Visible text</b><br>May contain identifiers that will be evaluated at popup call time.<br>For labels, this text can contain also limited HTML tags.</center>","editor"));
g->addWidget(m_pTextEditor,2,1,1,2);
- l = new QLabel(__tr2qs("Condition:"),this);
+ l = new QLabel(__tr2qs_ctx("Condition:"),this);
l->setMargin(2);
g->addWidget(l,3,0);
m_pConditionEditor = new QLineEdit(this);
m_pConditionEditor->setToolTip(
- __tr2qs("<center><b>Boolean condition</b><br>Will be evaluated at popup call time in order to decide if this entry has to be shown.<br>An empty condition evaluates to true.</center>"));
+ __tr2qs_ctx("<center><b>Boolean condition</b><br>Will be evaluated at popup call time in order to decide if this entry has to be shown.<br>An empty condition evaluates to true.</center>","editor"));
g->addWidget(m_pConditionEditor,3,1,1,2);
- l = new QLabel(__tr2qs("Icon:"),this);
+ l = new QLabel(__tr2qs_ctx("Icon:"),this);
l->setMargin(2);
g->addWidget(l,4,0);
m_pIconEditor = new QLineEdit(this);
m_pIconEditor->setToolTip(
- __tr2qs("<center><b>Icon identifier</b><br>May be an internal icon ID, an absolute path or a relative path.<br>Portable scripts should never use absolute paths.</center>"));
+ __tr2qs_ctx("<center><b>Icon identifier</b><br>May be an internal icon ID, an absolute path or a relative path.<br>Portable scripts should never use absolute paths.</center>","editor"));
g->addWidget(m_pIconEditor,4,1,1,2);
- l = new QLabel(__tr2qs("External menu:"),this);
+ l = new QLabel(__tr2qs_ctx("External menu:","editor"),this);
l->setMargin(2);
g->addWidget(l,5,0);
m_pExtNameEditor = new QLineEdit(this);
m_pExtNameEditor->setToolTip(
- __tr2qs("<center><b>External menu name</b><br>This allows to nest externally defined popup menus. The popup menu with the specified name will be looked up at menu setup time.</center>"));
+ __tr2qs_ctx("<center><b>External menu name</b><br>This allows to nest externally defined popup menus. The popup menu with the specified name will be looked up at menu setup time.</center>","editor"));
g->addWidget(m_pExtNameEditor,5,1,1,2);
- l = new QLabel(__tr2qs("Item Id:"),this);
+ l = new QLabel(__tr2qs_ctx("Item Id:","editor"),this);
l->setMargin(2);
g->addWidget(l,6,0);
m_pIdEditor = new QLineEdit(this);
m_pIdEditor->setToolTip(
- __tr2qs("<center><b>Item id</b><br>This will allow you to use delpopupitem later.</center>"));
+ __tr2qs_ctx("<center><b>Item id</b><br>This will allow you to use delpopupitem later.</center>","editor"));
g->addWidget(m_pIdEditor,6,1,1,2);
g->setColumnStretch(1,1);
g->setRowStretch(1,1);
@@ -380,84 +380,69 @@ void KviSinglePopupEditor::itemPressed(QTreeWidgetItem * it, int)
bIsMenu = ((KviPopupTreeWidgetItem *)it)->m_type == KviPopupTreeWidgetItem::Menu;
}
- m_pContextPopup->insertItem(__tr2qs("New Separator Below"),this,SLOT(contextNewSeparatorBelow()));
+ m_pContextPopup->insertItem(__tr2qs_ctx("New Separator Below","editor"),this,SLOT(contextNewSeparatorBelow()));
m_pContextPopup->setItemEnabled(
- m_pContextPopup->insertItem(__tr2qs("New Separator Above"),this,SLOT(contextNewSeparatorAbove())),
- it);
+ m_pContextPopup->insertItem(__tr2qs_ctx("New Separator Above","editor"),this,SLOT(contextNewSeparatorAbove())),it);
m_pContextPopup->setItemEnabled(
- m_pContextPopup->insertItem(__tr2qs("New Separator Inside"),this,SLOT(contextNewSeparatorInside())),
- it && bIsMenu);
+ m_pContextPopup->insertItem(__tr2qs_ctx("New Separator Inside","editor"),this,SLOT(contextNewSeparatorInside())),it && bIsMenu);
m_pContextPopup->insertSeparator();
- m_pContextPopup->insertItem(__tr2qs("New Label Below"),this,SLOT(contextNewLabelBelow()));
+ m_pContextPopup->insertItem(__tr2qs_ctx("New Label Below","editor"),this,SLOT(contextNewLabelBelow()));
m_pContextPopup->setItemEnabled(
- m_pContextPopup->insertItem(__tr2qs("New Label Above"),this,SLOT(contextNewLabelAbove())),
- it);
+ m_pContextPopup->insertItem(__tr2qs_ctx("New Label Above","editor"),this,SLOT(contextNewLabelAbove())),it);
m_pContextPopup->setItemEnabled(
- m_pContextPopup->insertItem(__tr2qs("New Label Inside"),this,SLOT(contextNewLabelInside())),
- it && bIsMenu);
+ m_pContextPopup->insertItem(__tr2qs_ctx("New Label Inside","editor"),this,SLOT(contextNewLabelInside())),it && bIsMenu);
m_pContextPopup->insertSeparator();
- m_pContextPopup->insertItem(__tr2qs("New Item Below"),this,SLOT(contextNewItemBelow()));
+ m_pContextPopup->insertItem(__tr2qs_ctx("New Item Below","editor"),this,SLOT(contextNewItemBelow()));
m_pContextPopup->setItemEnabled(
- m_pContextPopup->insertItem(__tr2qs("New Item Above"),this,SLOT(contextNewItemAbove())),
- it);
+ m_pContextPopup->insertItem(__tr2qs_ctx("New Item Above","editor"),this,SLOT(contextNewItemAbove())),it);
m_pContextPopup->setItemEnabled(
- m_pContextPopup->insertItem(__tr2qs("New Item Inside"),this,SLOT(contextNewItemInside())),
- it && bIsMenu);
+ m_pContextPopup->insertItem(__tr2qs_ctx("New Item Inside","editor"),this,SLOT(contextNewItemInside())),it && bIsMenu);
m_pContextPopup->insertSeparator();
- m_pContextPopup->insertItem(__tr2qs("New Menu Below"),this,SLOT(contextNewMenuBelow()));
+ m_pContextPopup->insertItem(__tr2qs_ctx("New Menu Below","editor"),this,SLOT(contextNewMenuBelow()));
m_pContextPopup->setItemEnabled(
- m_pContextPopup->insertItem(__tr2qs("New Menu Above"),this,SLOT(contextNewMenuAbove())),
- it);
+ m_pContextPopup->insertItem(__tr2qs_ctx("New Menu Above","editor"),this,SLOT(contextNewMenuAbove())),it);
m_pContextPopup->setItemEnabled(
- m_pContextPopup->insertItem(__tr2qs("New Menu Inside"),this,SLOT(contextNewMenuInside())),
- it && bIsMenu);
+ m_pContextPopup->insertItem(__tr2qs_ctx("New Menu Inside","editor"),this,SLOT(contextNewMenuInside())),it && bIsMenu);
- m_pContextPopup->insertSeparator();
+ m_pContextPopup->insertSeparator();
- m_pContextPopup->insertItem(__tr2qs("New External Menu Below"),this,SLOT(contextNewExtMenuBelow()));
+ m_pContextPopup->insertItem(__tr2qs_ctx("New External Menu Below","editor"),this,SLOT(contextNewExtMenuBelow()));
m_pContextPopup->setItemEnabled(
- m_pContextPopup->insertItem(__tr2qs("New External Menu Above"),this,SLOT(contextNewExtMenuAbove())),
- it);
+ m_pContextPopup->insertItem(__tr2qs_ctx("New External Menu Above","editor"),this,SLOT(contextNewExtMenuAbove())),it);
m_pContextPopup->setItemEnabled(
- m_pContextPopup->insertItem(__tr2qs("New External Menu Inside"),this,SLOT(contextNewExtMenuInside())),
- it && bIsMenu);
+ m_pContextPopup->insertItem(__tr2qs_ctx("New External Menu Inside","editor"),this,SLOT(contextNewExtMenuInside())),it && bIsMenu);
m_pContextPopup->insertSeparator();
m_pContextPopup->setItemEnabled(
- m_pContextPopup->insertItem(
- *(g_pIconManager->getSmallIcon(KVI_SMALLICON_CUT)),
- __tr2qs("Cu&t"),
- this,SLOT(contextCut())),
- it);
+ m_pContextPopup->insertItem(
+ *(g_pIconManager->getSmallIcon(KVI_SMALLICON_CUT)),
+ __tr2qs_ctx("Cu&t","editor"),
+ this,SLOT(contextCut())),it);
m_pContextPopup->setItemEnabled(
- m_pContextPopup->insertItem(
- *(g_pIconManager->getSmallIcon(KVI_SMALLICON_COPY)),
- __tr2qs("&Copy"),
- this,SLOT(contextCopy())),
- it);
+ m_pContextPopup->insertItem(
+ *(g_pIconManager->getSmallIcon(KVI_SMALLICON_COPY)),
+ __tr2qs_ctx("&Copy","editor"),
+ this,SLOT(contextCopy())),it);
m_pContextPopup->setItemEnabled(
- m_pContextPopup->insertItem(
- *(g_pIconManager->getSmallIcon(KVI_SMALLICON_PASTE)),
- __tr2qs("&Paste Below"),this,SLOT(contextPasteBelow())),
+ m_pContextPopup->insertItem(
+ *(g_pIconManager->getSmallIcon(KVI_SMALLICON_PASTE)),
+ __tr2qs_ctx("&Paste Below","editor"),this,SLOT(contextPasteBelow())),
m_pClipboard);
m_pContextPopup->setItemEnabled(
- m_pContextPopup->insertItem(
- *(g_pIconManager->getSmallIcon(KVI_SMALLICON_PASTE)),
- __tr2qs("Paste Above"),this,SLOT(contextPasteAbove())),
- it && m_pClipboard);
+ m_pContextPopup->insertItem(
+ *(g_pIconManager->getSmallIcon(KVI_SMALLICON_PASTE)),
+ __tr2qs_ctx("Paste Above","editor"),this,SLOT(contextPasteAbove())),it && m_pClipboard);
m_pContextPopup->setItemEnabled(
- m_pContextPopup->insertItem(
- *(g_pIconManager->getSmallIcon(KVI_SMALLICON_PASTE)),
- __tr2qs("Paste Inside"),this,SLOT(contextPasteInside())),
- it && bIsMenu && m_pClipboard);
-
+ m_pContextPopup->insertItem(
+ *(g_pIconManager->getSmallIcon(KVI_SMALLICON_PASTE)),
+ __tr2qs_ctx("Paste Inside","editor"),this,SLOT(contextPasteInside())),it && bIsMenu && m_pClipboard);
bool bSeparatorInserted = false;
@@ -467,7 +452,7 @@ void KviSinglePopupEditor::itemPressed(QTreeWidgetItem * it, int)
bSeparatorInserted = true;
m_pContextPopup->insertItem(
*(g_pIconManager->getSmallIcon(KVI_SMALLICON_PROLOGUE)),
- __tr2qs("New Menu Prologue"),this,SLOT(contextNewPrologue()));
+ __tr2qs_ctx("New Menu Prologue","editor"),this,SLOT(contextNewPrologue()));
// }
// if(!findEpilogue(parentMenu))
@@ -475,7 +460,7 @@ void KviSinglePopupEditor::itemPressed(QTreeWidgetItem * it, int)
if(!bSeparatorInserted)m_pContextPopup->insertSeparator();
m_pContextPopup->insertItem(
*(g_pIconManager->getSmallIcon(KVI_SMALLICON_EPILOGUE)),
- __tr2qs("New Menu Epilogue"),this,SLOT(contextNewEpilogue()));
+ __tr2qs_ctx("New Menu Epilogue","editor"),this,SLOT(contextNewEpilogue()));
// }
m_pContextPopup->popup(QCursor::pos());
@@ -556,7 +541,6 @@ void KviSinglePopupEditor::contextNewExtMenuInside()
createNewItemInsideLastSelected(KviPopupTreeWidgetItem::ExtMenu);
}
-
void KviSinglePopupEditor::contextNewLabelBelow()
{
createNewItemBelowLastSelected(KviPopupTreeWidgetItem::Label);
@@ -663,7 +647,6 @@ void KviSinglePopupEditor::contextPasteAbove()
KviPopupTreeWidgetItem * par = m_pLastSelectedItem ? (KviPopupTreeWidgetItem *)m_pLastSelectedItem->parent() : 0;
KviPopupTreeWidgetItem * above = m_pLastSelectedItem ? (KviPopupTreeWidgetItem *)m_pTreeWidget->itemAbove(m_pLastSelectedItem) : 0;
populateMenu(m_pClipboard,par,above);
-
}
void KviSinglePopupEditor::contextPasteInside()
@@ -1030,13 +1013,13 @@ KviPopupEditor::KviPopupEditor(QWidget * par)
KviTalVBox * box = new KviTalVBox(spl);
m_pTreeWidget = new KviTalTreeWidget(box);
- m_pTreeWidget->setHeaderLabel(__tr2qs("Popup"));
+ m_pTreeWidget->setHeaderLabel(__tr2qs_ctx("Popup","editor"));
m_pTreeWidget->setSelectionMode(QAbstractItemView::ExtendedSelection);
m_pTreeWidget->header()->setSortIndicatorShown(true);
- QPushButton * pb = new QPushButton(__tr2qs("&Export All To..."),box);
+ QPushButton * pb = new QPushButton(__tr2qs_ctx("&Export All To...","editor"),box);
connect(pb,SIGNAL(clicked()),this,SLOT(exportAll()));
- QPushButton * gn = new QPushButton(__tr2qs("&Export selected To..."),box);
+ QPushButton * gn = new QPushButton(__tr2qs_ctx("&Export selected To...","editor"),box);
connect(gn,SIGNAL(clicked()),this,SLOT(exportSelected()));
m_pEditor = new KviSinglePopupEditor(spl);
@@ -1093,22 +1076,20 @@ void KviPopupEditor::itemPressed(QTreeWidgetItem * it, int)
m_pContextPopup->insertItem(
*(g_pIconManager->getSmallIcon(KVI_SMALLICON_POPUP)),
- __tr2qs("&New Popup"),
+ __tr2qs_ctx("&New Popup","editor"),
this,SLOT(newPopup()));
m_pContextPopup->setItemEnabled(
- m_pContextPopup->insertItem(
- *(g_pIconManager->getSmallIcon(KVI_SMALLICON_QUIT)),
- __tr2qs("Re&move Popup"),
- this,SLOT(removeCurrentPopup())),
- it);
+ m_pContextPopup->insertItem(
+ *(g_pIconManager->getSmallIcon(KVI_SMALLICON_QUIT)),
+ __tr2qs_ctx("Re&move Popup","editor"),
+ this,SLOT(removeCurrentPopup())),it);
m_pContextPopup->setItemEnabled(
- m_pContextPopup->insertItem(
- *(g_pIconManager->getSmallIcon(KVI_SMALLICON_FOLDER)),
- __tr2qs("&Export Popup To..."),
- this,SLOT(exportCurrentPopup())),
- it);
+ m_pContextPopup->insertItem(
+ *(g_pIconManager->getSmallIcon(KVI_SMALLICON_FOLDER)),
+ __tr2qs_ctx("&Export Popup To...","editor"),
+ this,SLOT(exportCurrentPopup())),it);
m_pContextPopup->popup(QCursor::pos());
}
@@ -1126,14 +1107,14 @@ void KviPopupEditor::exportCurrentPopup()
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;
m_pLastEditedItem->popup()->generateDefPopup(szOut);
if(!KviFileUtils::writeFile(szFile,szOut))
{
- QMessageBox::warning(this,__tr2qs("Write Failed - KVIrc"),__tr2qs("Unable to write to the popup file."),__tr2qs("Ok"));
+ QMessageBox::warning(this,__tr2qs_ctx("Write Failed - KVIrc","editor"),__tr2qs_ctx("Unable to write to the popup file.","editor"),__tr2qs_ctx("Ok","editor"));
}
}
@@ -1176,11 +1157,11 @@ void KviPopupEditor::exportPopups(bool bSelectedOnly)
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 alias file."),__tr2qs("Ok"));
+ QMessageBox::warning(this,__tr2qs_ctx("Write Failed - KVIrc","editor"),__tr2qs_ctx("Unable to write to the alias file.","editor"),__tr2qs_ctx("Ok","editor"));
}
}
@@ -1277,7 +1258,7 @@ void KviPopupEditor::getUniquePopupName(KviMenuTreeWidgetItem *item,QString &buf
{
__range_valid(m_bOneTimeSetupDone);
- if(buffer.isEmpty())buffer = __tr2qs("unnamed");
+ if(buffer.isEmpty())buffer = __tr2qs_ctx("unnamed");
QString newName = buffer;
bool bFound = true;
@@ -1317,17 +1298,17 @@ KviPopupEditorWindow::KviPopupEditorWindow(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);
@@ -1370,7 +1351,7 @@ void KviPopupEditorWindow::resizeEvent(QResizeEvent *)
void KviPopupEditorWindow::fillCaptionBuffers()
{
- m_szPlainTextCaption = __tr2qs("Popup Editor");
+ m_szPlainTextCaption = __tr2qs_ctx("Popup Editor","editor");
static QString p1("<nobr><font color=\"");
static QString p2("\"><b>");
diff --git a/src/modules/toolbareditor/libkvitoolbareditor.cpp b/src/modules/toolbareditor/libkvitoolbareditor.cpp
index 02209b418..6ebd93e9d 100644
--- a/src/modules/toolbareditor/libkvitoolbareditor.cpp
+++ b/src/modules/toolbareditor/libkvitoolbareditor.cpp
@@ -62,7 +62,6 @@ static bool toolbareditor_module_init(KviModule * m)
KviConfig cfg(szBuf,KviConfig::Read);
g_rectToolBarEditorDialogGeometry = cfg.readRectEntry("EditorGeometry",QRect(10,10,390,440));
-
return true;
}
diff --git a/src/modules/toolbareditor/toolbareditor.cpp b/src/modules/toolbareditor/toolbareditor.cpp
index 3a9419f12..971339820 100644
--- a/src/modules/toolbareditor/toolbareditor.cpp
+++ b/src/modules/toolbareditor/toolbareditor.cpp
@@ -61,7 +61,7 @@ KviTrashcanLabel::KviTrashcanLabel(QWidget * p)
: QLabel(p)
{
setPixmap(*(g_pIconManager->getBigIcon("kvi_bigicon_trashcan.png")));
- KviTalToolTip::add(this,__tr2qs("Drop here the icons from the toolbars to remove them"));
+ KviTalToolTip::add(this,__tr2qs_ctx("Drop here the icons from the toolbars to remove them","editor"));
setFrameStyle(QFrame::Sunken | QFrame::WinPanel);
setAcceptDrops(true);
setAlignment(Qt::AlignCenter);
@@ -130,7 +130,7 @@ KviCustomToolBarPropertiesDialog::KviCustomToolBarPropertiesDialog(QWidget * p,c
m_szOriginalId = szId;
m_szLabel = szLabel;
- setWindowTitle(__tr2qs("ToolBar Properties"));
+ setWindowTitle(__tr2qs_ctx("ToolBar Properties","editor"));
setWindowIcon(QIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TOOLBAR))));
QGridLayout * g = new QGridLayout(this);
@@ -139,7 +139,7 @@ KviCustomToolBarPropertiesDialog::KviCustomToolBarPropertiesDialog(QWidget * p,c
g->addWidget(l,0,0,1,6);
// g->addMultiCellWidget(l,0,0,0,5);
- l = new QLabel(__tr2qs("Label") + ":",this);
+ l = new QLabel(__tr2qs_ctx("Label","editor") + ":",this);
g->addWidget(l,1,0);
m_pLabelEdit = new QLineEdit(this);
@@ -148,7 +148,7 @@ KviCustomToolBarPropertiesDialog::KviCustomToolBarPropertiesDialog(QWidget * p,c
m_pLabelEdit->setText(szLabel);
connect(m_pLabelEdit,SIGNAL(textChanged(const QString &)),this,SLOT(labelTextChanged(const QString &)));
- l = new QLabel(__tr2qs("Icon") + ":",this);
+ l = new QLabel(__tr2qs_ctx("Icon","editor") + ":",this);
g->addWidget(l,2,0);
m_pIconEdit = new QLineEdit(this);
@@ -167,7 +167,7 @@ KviCustomToolBarPropertiesDialog::KviCustomToolBarPropertiesDialog(QWidget * p,c
m_pAdvanced = new QWidget(this);
QGridLayout * ag = new QGridLayout(m_pAdvanced);
- l = new QLabel(__tr2qs("Id") + ":",m_pAdvanced);
+ l = new QLabel(__tr2qs_ctx("Id","editor") + ":",m_pAdvanced);
l->setMinimumWidth(100);
ag->addWidget(l,0,0);
@@ -183,18 +183,18 @@ KviCustomToolBarPropertiesDialog::KviCustomToolBarPropertiesDialog(QWidget * p,c
m_pLabelEdit->setFocus();
- QPushButton * pb = new QPushButton(__tr2qs("OK"),this);
+ QPushButton * pb = new QPushButton(__tr2qs_ctx("OK","editor"),this);
connect(pb,SIGNAL(clicked()),this,SLOT(okClicked()));
pb->setMinimumWidth(80);
g->addWidget(pb,4,4,1,2);
//g->addMultiCellWidget(pb,4,4,4,5);
- pb = new QPushButton(__tr2qs("Cancel"),this);
+ pb = new QPushButton(__tr2qs_ctx("Cancel","editor"),this);
connect(pb,SIGNAL(clicked()),this,SLOT(reject()));
pb->setMinimumWidth(80);
g->addWidget(pb,4,3);
- m_pAdvancedButton = new QPushButton(__tr2qs("Advanced..."),this);
+ m_pAdvancedButton = new QPushButton(__tr2qs_ctx("Advanced...","editor"),this);
connect(m_pAdvancedButton,SIGNAL(clicked()),this,SLOT(advancedClicked()));
m_pAdvancedButton->setMinimumWidth(100);
g->addWidget(m_pAdvancedButton,4,0,1,2);
@@ -225,7 +225,7 @@ void KviCustomToolBarPropertiesDialog::iconSelected(const QString &szIconId)
void KviCustomToolBarPropertiesDialog::iconButtonClicked()
{
- KviImageDialog * dlg = new KviImageDialog(this,__tr2qs("Please choose the icon for the ToolBar"));
+ KviImageDialog * dlg = new KviImageDialog(this,__tr2qs_ctx("Please choose the icon for the ToolBar","editor"));
if(dlg->exec() != QDialog::Accepted)
{
delete dlg;
@@ -249,7 +249,7 @@ void KviCustomToolBarPropertiesDialog::okClicked()
{
if(m_szLabel.isEmpty())
{
- QMessageBox::information(this,__tr2qs("Invalid ToolBar Label"),__tr2qs("The ToolBar Label can't be empty!"),__tr2qs("OK"));
+ QMessageBox::information(this,__tr2qs_ctx("Invalid ToolBar Label","editor"),__tr2qs_ctx("The ToolBar Label can't be empty!","editor"),__tr2qs_ctx("OK","editor"));
return;
}
@@ -262,11 +262,11 @@ void KviCustomToolBarPropertiesDialog::okClicked()
{
if(m_szId != m_szOriginalId)
{
- if(QMessageBox::information(this,__tr2qs("Duplicate ToolBar Id"),
- __tr2qs("The specified ToolBar Id already exists.<br>" \
+ if(QMessageBox::information(this,__tr2qs_ctx("Duplicate ToolBar Id","editor"),
+ __tr2qs_ctx("The specified ToolBar Id already exists.<br>" \
"Would you like KVIrc to assign it automatically (so it doesn't "
- "collide with any other toolbar) or you prefer to do it manually ?"),
- __tr2qs("Manually"),__tr2qs("Automatically")) == 0)return;
+ "collide with any other toolbar) or you prefer to do it manually ?","editor"),
+ __tr2qs_ctx("Manually","editor"),__tr2qs_ctx("Automatically","editor")) == 0)return;
m_szId = KviCustomToolBarManager::instance()->idForNewToolBar(m_szLabel);
}
}
@@ -281,10 +281,10 @@ void KviCustomToolBarPropertiesDialog::advancedClicked()
if(m_pAdvanced->isVisible())
{
m_pAdvanced->hide();
- m_pAdvancedButton->setText(__tr2qs("Advanced..."));
+ m_pAdvancedButton->setText(__tr2qs_ctx("Advanced...","editor"));
} else {
m_pAdvanced->show();
- m_pAdvancedButton->setText(__tr2qs("Hide Advanced"));
+ m_pAdvancedButton->setText(__tr2qs_ctx("Hide Advanced","editor"));
}
}
@@ -294,8 +294,8 @@ KviCustomizeToolBarsDialog::KviCustomizeToolBarsDialog(QWidget * p)
: QDialog(p)//,"" /*,WType_TopLevel | WStyle_Customize | WStyle_Title | WStyle_StaysOnTop | WStyle_DialogBorder*/)
{
setObjectName("Toolbar_editor");
- debug("TOol bar editor");
- setWindowTitle(__tr2qs("Customize Toolbars"));
+ debug("Toolbar editor");
+ setWindowTitle(__tr2qs_ctx("Customize Toolbars","editor"));
setWindowIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TOOLBAR)));
m_pInstance = this;
@@ -305,15 +305,15 @@ KviCustomizeToolBarsDialog::KviCustomizeToolBarsDialog(QWidget * p)
g->addWidget(m_pDrawer,0,0,7,1);
// g->addMultiCellWidget(m_pDrawer,0,6,0,0);
- QPushButton * b = new QPushButton(__tr2qs("New ToolBar"),this);
+ QPushButton * b = new QPushButton(__tr2qs_ctx("New ToolBar","editor"),this);
connect(b,SIGNAL(clicked()),this,SLOT(newToolBar()));
g->addWidget(b,0,1);
- m_pDeleteToolBarButton = new QPushButton(__tr2qs("Delete ToolBar"),this);
+ m_pDeleteToolBarButton = new QPushButton(__tr2qs_ctx("Delete ToolBar","editor"),this);
connect(m_pDeleteToolBarButton,SIGNAL(clicked()),this,SLOT(deleteToolBar()));
g->addWidget(m_pDeleteToolBarButton,1,1);
- m_pRenameToolBarButton = new QPushButton(__tr2qs("Edit ToolBar"),this);
+ m_pRenameToolBarButton = new QPushButton(__tr2qs_ctx("Edit ToolBar","editor"),this);
connect(m_pRenameToolBarButton,SIGNAL(clicked()),this,SLOT(renameToolBar()));
g->addWidget(m_pRenameToolBarButton,2,1);
@@ -321,14 +321,14 @@ KviCustomizeToolBarsDialog::KviCustomizeToolBarsDialog(QWidget * p)
f->setFrameStyle(QFrame::HLine | QFrame::Sunken);
g->addWidget(f,3,1);
- m_pExportToolBarButton = new QPushButton(__tr2qs("Export ToolBar"),this);
+ m_pExportToolBarButton = new QPushButton(__tr2qs_ctx("Export ToolBar","editor"),this);
connect(m_pExportToolBarButton,SIGNAL(clicked()),this,SLOT(exportToolBar()));
g->addWidget(m_pExportToolBarButton,4,1);
KviTrashcanLabel * t = new KviTrashcanLabel(this);
g->addWidget(t,6,1);
- b = new QPushButton(__tr2qs("Close"),this);
+ b = new QPushButton(__tr2qs_ctx("Close","editor"),this);
connect(b,SIGNAL(clicked()),this,SLOT(closeClicked()));
g->addWidget(b,7,1);
@@ -380,10 +380,10 @@ void KviCustomizeToolBarsDialog::deleteToolBar()
KviCustomToolBar * t = KviActionManager::currentToolBar();
if(!t)return;
if(QMessageBox::question(this,
- __tr2qs("Confirm ToolBar Deletion"),
- __tr2qs("Do you really want to delete toolbar \"%1\" ?").arg(t->windowTitle()),
- __tr2qs("No"),
- __tr2qs("Yes")) == 0)return;
+ __tr2qs_ctx("Confirm ToolBar Deletion","editor"),
+ __tr2qs_ctx("Do you really want to delete toolbar \"%1\" ?","editor").arg(t->windowTitle()),
+ __tr2qs_ctx("No","editor"),
+ __tr2qs_ctx("Yes","editor")) == 0)return;
KviCustomToolBarManager::instance()->destroyDescriptor(t->descriptor()->id());
}
@@ -399,16 +399,16 @@ void KviCustomizeToolBarsDialog::exportToolBar()
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 szCode;
int ret = QMessageBox::question(this,
- __tr2qs("ToolBar Export"),
- __tr2qs("Do you want the associated actions to be exported with the toolbar ?"),
- __tr2qs("Yes"),
- __tr2qs("No"),
- __tr2qs("Cancel"));
+ __tr2qs_ctx("ToolBar Export","editor"),
+ __tr2qs_ctx("Do you want the associated actions to be exported with the toolbar ?","editor"),
+ __tr2qs_ctx("Yes","editor"),
+ __tr2qs_ctx("No","editor"),
+ __tr2qs_ctx("Cancel","editor"));
if(ret == 2)return;
@@ -461,7 +461,7 @@ void KviCustomizeToolBarsDialog::exportToolBar()
if(!KviFileUtils::writeFile(szFile,szCode))
{
- QMessageBox::warning(this,__tr2qs("Write Failed - KVIrc"),__tr2qs("Unable to write to the toolbar file."),__tr2qs("OK"));
+ QMessageBox::warning(this,__tr2qs_ctx("Write Failed - KVIrc","editor"),__tr2qs_ctx("Unable to write to the toolbar file.","editor"),__tr2qs_ctx("OK","editor"));
}
}
@@ -471,7 +471,7 @@ void KviCustomizeToolBarsDialog::renameToolBar()
if(!t)return;
KviCustomToolBarPropertiesDialog * dlg = new KviCustomToolBarPropertiesDialog(this,
- __tr2qs("Please specify the properties for the toolbar \"%1\"").arg(t->windowTitle()),
+ __tr2qs_ctx("Please specify the properties for the toolbar \"%1\"","editor").arg(t->windowTitle()),
t->descriptor()->id(),
t->descriptor()->labelCode(),
t->descriptor()->iconId());
@@ -497,9 +497,9 @@ void KviCustomizeToolBarsDialog::renameToolBar()
void KviCustomizeToolBarsDialog::newToolBar()
{
KviCustomToolBarPropertiesDialog * dlg = new KviCustomToolBarPropertiesDialog(this,
- __tr2qs("Please specify the properties for the new toolbar"),
- KviCustomToolBarManager::instance()->idForNewToolBar(__tr2qs("My ToolBar")),
- __tr2qs("My ToolBar"));
+ __tr2qs_ctx("Please specify the properties for the new toolbar","editor"),
+ KviCustomToolBarManager::instance()->idForNewToolBar(__tr2qs_ctx("My ToolBar","editor")),
+ __tr2qs_ctx("My ToolBar","editor"));
dlg->show();
if(dlg->exec() != QDialog::Accepted)