Commit a4b1202f authored by Tomas Mecir's avatar Tomas Mecir
Browse files
parents 2be43cde 1e130d2c
......@@ -28,7 +28,6 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} )
add_subdirectory( libs )
add_subdirectory( kmuddy )
add_subdirectory( plugins )
add_subdirectory( po )
add_subdirectory( scripting )
include_directories( ${KDE4_INCLUDE_DIR} ${QT_INCLUDES} )
......
......@@ -263,9 +263,7 @@ void cConnection::eventStringHandler (QString event, int, QString &par1, const Q
addCommands (par1.split ("\n"));
}
else if (event == "connection-failed") {
QString error = i18n ("Network error: ");
error += par1;
invokeEvent ("message", sess(), error);
invokeEvent ("message", sess(), i18n ("Network error: %1", par1));
setConnectionClosed (true);
updateMenus ();
}
......@@ -427,7 +425,7 @@ bool cConnection::handleDisconnect ()
return true; //no longer connected
//ask if he really wants to disconnect
if (KMessageBox::questionYesNoCancel (KMuddy::self(),
i18n("Do you want to close connection to ")+d->caption+"?",
i18n("Do you want to close connection to %1?", d->caption),
i18n("Disconnect")) == KMessageBox::Yes)
{
disconnect ();
......
......@@ -75,7 +75,7 @@ void cGaugeEditor::createGUI(QWidget *parent)
d->caption->setWhatsThis( i18n ("Caption shown next to variable value."));
// color
QLabel *lbl4 = new QLabel (i18n ("&Caption"), parent);
QLabel *lbl4 = new QLabel (i18n ("&Color"), parent);
d->btcolor = new KColorButton (Qt::white, parent);
lbl4->setBuddy (d->btcolor);
d->btcolor->setWhatsThis( i18n ("Color used to paint this gauge."));
......
......@@ -307,7 +307,7 @@ void cMXPManager::processResult (mxpResult *res)
case 21: reqName = i18n ("image map"); break;
default: reqName = i18n ("unknown"); break;
};
cMXPConsole::self()->addWarning (sess(), i18n ("Ignoring unsupported MXP request") + " (" + reqName + ").");
cMXPConsole::self()->addWarning (sess(), i18n ("Ignoring unsupported MXP request (%1)", reqName));
}
break;
};
......
......@@ -68,7 +68,7 @@ void cShortcutEditor::createGUI(QWidget *parent)
QLabel *lbl1 = new QLabel (i18n ("&Command"), basicPage);
d->cmd = new KLineEdit (basicPage);
lbl1->setBuddy (d->cmd);
d->cmd->setWhatsThis( i18n ("Command that will be executed when you press the"
d->cmd->setWhatsThis( i18n ("Command that will be executed when you press the "
"defined key combination.\n"
"Command can include aliases, script calls and similar stuff."));
......@@ -86,7 +86,7 @@ void cShortcutEditor::createGUI(QWidget *parent)
d->chkoverwrite = new QCheckBox (i18n ("&Overwrite existing text"), basicPage);
d->chkoverwrite->setWhatsThis( i18n ("If there already is some text in "
"the inputline, should it be overwritten?"));
"the input line, should it be overwritten?"));
connect (d->chksendit, SIGNAL (toggled (bool)), d->chkoverwrite, SLOT (setDisabled (bool)));
QWidget *commonEditor = createCommonAttribEditor (basicPage);
......
......@@ -248,7 +248,7 @@ void cTelnet::connectIt (const QString &address, int port, cProfileSettings *set
setupEncoding ();
d->_connecting = true;
cActionManager::self()->invokeEvent ("message", sess(), i18n ("Connecting ..."));
cActionManager::self()->invokeEvent ("message", sess(), i18n ("Connecting..."));
d->hostName = address;
d->hostPort = port;
d->socket = KSocketFactory::connectToHost ("telnet", address, port);
......
......@@ -67,6 +67,7 @@ void cTimer::attribChanged (const QString &name)
void cTimer::updateVisibleName()
{
//FIXME: fix word puzzle
QString command = strVal ("command");
if (command.isEmpty() && (!strVal ("script").isEmpty())) command = "(script)";
if (command.isEmpty()) {
......
......@@ -159,7 +159,7 @@ void cTriggerEditor::createGUI(QWidget *parent)
d->type->addItem (i18n ("Ends with"));
d->type->addItem (i18n ("Regular expression"));
d->type->setWhatsThis( i18n ("Type of matching. Trigger will only be activated "
"if this passes this type of test. Note that triggeres are always matched as whole words."));
"if this passes this type of test. Note that triggers are always matched as whole words."));
comboEditLayout->addWidget (d->type);
//Check if kdeutils kregeditor is available...
......@@ -245,9 +245,9 @@ void cTriggerEditor::createGUI(QWidget *parent)
"lower case letters are treated as different characters, otherwise "
"they're considered to be the same."));
d->check3 = new QCheckBox (i18n ("Show, don't send"), options);
d->check3->setWhatsThis (i18n ("When enabled, the text won't be send to the MUD, it will be "
"only displayed on the screen."));
d->check3 = new QCheckBox (i18n ("Show but do not send"), options);
d->check3->setWhatsThis (i18n ("When enabled, the text will not be sent to the MUD, it will only be "
"displayed on the screen."));
d->check4 = new QCheckBox (i18n ("Global matching"), options);
d->check4->setWhatsThis( i18n ("<p>With global matching, one trigger/trigger can match multiple "
......@@ -255,7 +255,7 @@ void cTriggerEditor::createGUI(QWidget *parent)
"it matches only once on abcdabcd of global matching is off, but twice if it's on. "
"For each match, the requested actions are performed - so the commands can be sent "
"multiple times, once per match.</p>"
"<p>Note that failing the condition doesn't terminate scanning, so you can use "
"<p>Note that failing the condition does not terminate scanning, so you can use "
"this to highlight names from a list (using the condition to check if a match is in the "
"list), or something like that."));
......@@ -409,7 +409,7 @@ void cTriggerEditor::createGUI(QWidget *parent)
// the Special trigger tab
QFrame *specialPage = new QFrame (tabs);
QGridLayout *speciallayout = new QGridLayout (specialPage);
d->chkgag = new QCheckBox (i18n ("Don't show (&gag) the line"), specialPage);
d->chkgag = new QCheckBox (i18n ("Do not show (&gag) the line"), specialPage);
d->chkgag->setWhatsThis( i18n ("This will prevent the matched line "
"from being displayed in the output window."));
d->chknotify = new QCheckBox (i18n ("&Notify"), specialPage);
......@@ -422,7 +422,7 @@ void cTriggerEditor::createGUI(QWidget *parent)
d->chkprompt = new QCheckBox (i18n ("&Prompt-detection trigger"), specialPage);
d->chkprompt->setWhatsThis( i18n ("Enabling this will turn this trigger "
"into a prompt-detection trigger, that is, text will be passed to these "
"into a prompt detection trigger, that is, text will be passed to these "
"triggers even if no newline was received, the text will be displayed "
"as a prompt if the trigger gets matched, and most other options will "
"NOT be taken into effect - prompt-detect trigger cannot send out "
......@@ -462,14 +462,14 @@ void cTriggerEditor::createGUI(QWidget *parent)
d->windowlist->clear();
d->chkgagoutput = new QCheckBox (i18n ("&Gag output in main window"), outwindow);
d->chkgagoutput->setWhatsThis( i18n ("This will cause output sent to separate window to not to "
d->chkgagoutput->setWhatsThis( i18n ("This will cause output sent to a separate window not to "
"be displayed in main KMuddy session window"));
QLabel *wnl = new QLabel ("&Window name", outwindow);
QLabel *wnl = new QLabel (i18n ("&Window name"), outwindow);
d->wname = new KLineEdit (outwindow);
wnl->setBuddy(d->wname);
QPushButton *createwindow = new QPushButton ("&Create window", outwindow);
QPushButton *createwindow = new QPushButton (i18n ("&Create window"), outwindow);
connect (createwindow, SIGNAL (clicked ()), this, SLOT (createOutputWindow ()));
owlayout->addWidget (wll);
......
......@@ -94,10 +94,10 @@ dlgAppSettings::dlgAppSettings (QWidget *parent) : KPageDialog (parent)
//always tabbar
chkalwaystabbar = new QCheckBox (i18n ("S&how the tab bar even if not needed"), frmwindow);
chkalwaystabbar->setWhatsThis( i18n ("If this is checked, the tab bar will "
"be always shown. Otherwise, it will be hidden if it contains only one tab."));
"always be shown. Otherwise, it will be hidden if it contains only one tab."));
//auxiliary input
chkauxinput = new QCheckBox (i18n ("Show au&xiliary input line"), frmwindow);
chkauxinput->setWhatsThis( i18n ("You'll have two input lines instead of one."));
chkauxinput->setWhatsThis( i18n ("You will have two input lines instead of one."));
//always notify
chkalwaysnotify = new QCheckBox (i18n ("&Always notify"), frmwindow);
chkalwaysnotify->setWhatsThis( i18n ("If this is checked, output notification "
......@@ -281,7 +281,7 @@ dlgAppSettings::dlgAppSettings (QWidget *parent) : KPageDialog (parent)
//edhistory shouldn't be too wide too
edforceredraw->setMaximumSize (edforceredraw->minimumSizeHint ());
edforceredraw->setWhatsThis( i18n ("Forced redraw after adding a given amount "
"of lines. Setting this to a low number may prevent some displaying problems, at a cost"
"of lines. Setting this to a low number may prevent some displaying problems, at a cost "
"of higher CPU usage. Setting it to Never will disable the feature, redraw will "
"only occur when needed."));
......@@ -404,9 +404,9 @@ dlgAppSettings::dlgAppSettings (QWidget *parent) : KPageDialog (parent)
inputcombolayout->setColumnStretch (2, 3);
//swap ENTERS
chkswapenters = new QCheckBox (i18n ("S&wap ENTER and CTRL+ENTER for multi-line"), frminput);
chkswapenters->setWhatsThis( i18n ("When turned off, CTRL+ENTER will insert another"
chkswapenters->setWhatsThis( i18n ("When turned off, CTRL+ENTER will insert another "
"line in the multi-line input line, and ENTER will send commands to the server. "
"If turned of, then the behaviour of these keys gets swapped."));
"If turned on, then the behaviour of these keys gets swapped."));
//place widgets on the page
inputlayout->addWidget (chkkeeptext);
inputlayout->addWidget (chkselectkepttext);
......
......@@ -217,12 +217,12 @@ void dlgConnect::deletePressed ()
// can we do that ?
if (mgr->hasSessionAssigned (profile)) {
KMessageBox::sorry (this, i18n ("This profile can not be deleted, because you have a connection open using this profile."), i18n ("Unable to delete"));
KMessageBox::sorry (this, i18n ("This profile cannot be deleted, because you have a connection open using this profile."), i18n ("Unable to delete"));
return;
}
if (KMessageBox::questionYesNoCancel (this,
i18n ("Do you really want to delete profile ") + mgr->visibleProfileName (profile) + i18n (" ?"),
i18n ("Do you really want to delete profile %1?", mgr->visibleProfileName (profile)),
i18n ("Delete profile")) != KMessageBox::Yes)
return;
......
......@@ -63,7 +63,7 @@ dlgEditProfile::dlgEditProfile(QWidget *parent) : KDialog (parent)
QLabel *l3 = new QLabel (i18n ("&Port:"), page);
ed3 = new KRestrictedLine (page);
ed3->setValidChars ("0123456789");
ed3->setWhatsThis( i18n ("Enter port on which it's running (usually some 4-digit number)."));
ed3->setWhatsThis( i18n ("Enter port on which your MUD running (usually some 4-digit number)."));
QLabel *l4 = new QLabel (i18n ("&Login name:"), page);
ed4 = new KLineEdit (page);
ed4->setWhatsThis( i18n ("Enter your login name on the MUD here.<p><i>This setting is optional.</i>"));
......
......@@ -37,7 +37,7 @@ dlgGrabKey::dlgGrabKey (QWidget *parent) : KDialog (parent)
//create main dialog's widget
KVBox *vbox = new KVBox (this);
setMainWidget (vbox);
new QLabel (i18n ("Press the desired short-cut..."), vbox);
new QLabel (i18n ("Press the desired shortcut..."), vbox);
}
dlgGrabKey::~dlgGrabKey ()
......
......@@ -53,7 +53,7 @@ dlgProfileSettings::dlgProfileSettings (QWidget *parent) : KPageDialog (parent)
item = addPage (frmcommands, i18n ("Commands"));
item->setIcon (KIcon ("gear"));
QFrame *frmdirs = new QFrame (this);
item = addPage (frmdirs, i18n ("Directories"));
item = addPage (frmdirs, i18n ("Folders"));
item->setIcon (KIcon ("folder"));
QFrame *frmsound = new QFrame (this);
item = addPage (frmsound, i18n ("Sound"));
......@@ -75,7 +75,7 @@ dlgProfileSettings::dlgProfileSettings (QWidget *parent) : KPageDialog (parent)
startupneg = new QCheckBox (i18n ("Enable telnet &negotiation on startup"), frmconn);
startupneg->setWhatsThis( i18n ("Enables telnet negotiation for some option. Disabling "
"it may resolve problems with some servers that don't understand these."));
"it may resolve problems with some servers that do not understand these."));
// encoding
QLabel *lblencoding = new QLabel (i18n ("&Encoding:"), frmconn);
......@@ -152,7 +152,7 @@ dlgProfileSettings::dlgProfileSettings (QWidget *parent) : KPageDialog (parent)
edscriptdir = new KLineEdit (frmdirs);
sl1->setBuddy (edscriptdir);
QPushButton *locbutton = new QPushButton (i18n ("Browse..."), frmdirs);
edscriptdir->setWhatsThis( i18n ("Default directory where we'll look for "
edscriptdir->setWhatsThis( i18n ("Default directory where we will look for "
"scripts."));
QLabel *sl2 = new QLabel (i18n ("&Working directory"), frmdirs);
......
......@@ -460,52 +460,52 @@ void KMuddy::prepareObjects ()
acol->addAction ("NextTab", nexttab);
KAction *tabnum[10];
tabnum[0] = new KAction (this);
tabnum[0]->setText (i18n ("Switch to tab 1"));
tabnum[0]->setText (i18nc ("%1 - tab number", "Switch to tab %1", "1"));
tabnum[0]->setShortcut (ALT+Qt::Key_1);
connect (tabnum[0], SIGNAL (triggered()), this, SLOT (switchTab1()));
acol->addAction ("SwitchTab1", tabnum[0]);
tabnum[1] = new KAction (this);
tabnum[1]->setText (i18n ("Switch to tab 2"));
tabnum[1]->setText (i18nc ("%1 - tab number", "Switch to tab %1", "2"));
tabnum[1]->setShortcut (ALT+Qt::Key_2);
connect (tabnum[1], SIGNAL (triggered()), this, SLOT (switchTab2()));
acol->addAction ("SwitchTab2", tabnum[1]);
tabnum[2] = new KAction (this);
tabnum[2]->setText (i18n ("Switch to tab 3"));
tabnum[2]->setText (i18nc ("%1 - tab number", "Switch to tab %1", "3"));
tabnum[2]->setShortcut (ALT+Qt::Key_3);
connect (tabnum[2], SIGNAL (triggered()), this, SLOT (switchTab3()));
acol->addAction ("SwitchTab3", tabnum[2]);
tabnum[3] = new KAction (this);
tabnum[3]->setText (i18n ("Switch to tab 4"));
tabnum[3]->setText (i18nc ("%1 - tab number", "Switch to tab %1", "4"));
tabnum[3]->setShortcut (ALT+Qt::Key_4);
connect (tabnum[3], SIGNAL (triggered()), this, SLOT (switchTab4()));
acol->addAction ("SwitchTab4", tabnum[3]);
tabnum[4] = new KAction (this);
tabnum[4]->setText (i18n ("Switch to tab 5"));
tabnum[4]->setText (i18nc ("%1 - tab number", "Switch to tab %1", "5"));
tabnum[4]->setShortcut (ALT+Qt::Key_5);
connect (tabnum[4], SIGNAL (triggered()), this, SLOT (switchTab5()));
acol->addAction ("SwitchTab5", tabnum[4]);
tabnum[5] = new KAction (this);
tabnum[5]->setText (i18n ("Switch to tab 6"));
tabnum[5]->setText (i18nc ("%1 - tab number", "Switch to tab %1", "6"));
tabnum[5]->setShortcut (ALT+Qt::Key_6);
connect (tabnum[5], SIGNAL (triggered()), this, SLOT (switchTab6()));
acol->addAction ("SwitchTab6", tabnum[5]);
tabnum[6] = new KAction (this);
tabnum[6]->setText (i18n ("Switch to tab 7"));
tabnum[6]->setText (i18nc ("%1 - tab number", "Switch to tab %1", "7"));
tabnum[6]->setShortcut (ALT+Qt::Key_7);
connect (tabnum[6], SIGNAL (triggered()), this, SLOT (switchTab7()));
acol->addAction ("SwitchTab7", tabnum[6]);
tabnum[7] = new KAction (this);
tabnum[7]->setText (i18n ("Switch to tab 8"));
tabnum[7]->setText (i18nc ("%1 - tab number", "Switch to tab %1", "8"));
tabnum[7]->setShortcut (ALT+Qt::Key_8);
connect (tabnum[7], SIGNAL (triggered()), this, SLOT (switchTab8()));
acol->addAction ("SwitchTab8", tabnum[7]);
tabnum[8] = new KAction (this);
tabnum[8]->setText (i18n ("Switch to tab 9"));
tabnum[8]->setText (i18nc ("%1 - tab number", "Switch to tab %1", "9"));
tabnum[8]->setShortcut (ALT+Qt::Key_9);
connect (tabnum[8], SIGNAL (triggered()), this, SLOT (switchTab9()));
acol->addAction ("SwitchTab9", tabnum[8]);
tabnum[9] = new KAction (this);
tabnum[9]->setText (i18n ("Switch to tab 10"));
tabnum[9]->setText (i18nc ("%1 - tab number", "Switch to tab %1", "10"));
tabnum[9]->setShortcut (ALT+Qt::Key_0);
connect (tabnum[9], SIGNAL (triggered()), this, SLOT (switchTab10()));
acol->addAction ("SwitchTab10", tabnum[9]);
......@@ -914,10 +914,7 @@ QString KMuddy::reconnectText ()
{
KActionCollection *acol = am->getACol ();
QAction *reconnect = acol->action ("Reconnect");
QString text = i18n (" To reconnect, press");
text += " " + reconnect->shortcut().toString() + " ";
text += i18n ("or use Connection / Reconnect.");
return text;
return i18n ("To reconnect, press %1 or use Connection / Reconnect.", reconnect->shortcut().toString());;
}
void KMuddy::aboutApp ()
......
......@@ -2,10 +2,40 @@
Version=1.0
Encoding=UTF-8
Name=KMuddy
Name[cs]=KMuddy
Name[de]=KMuddy
Name[es]=KMuddy
Name[et]=KMuddy
Name[fr]=KMuddy
Name[km]=
Name[nl]=KMuddy
Name[pt]=KMuddy
Name[pt_BR]=KMuddy
Name[sv]=Kmuddy
Name[uk]=KMuddy
Name[x-test]=xxKMuddyxx
Type=Application
Exec=kmuddy -caption "%c" %i %m
Icon=kmuddy.png
DocPath=kmuddy/index.html
GenericName=MUD client
GenericName[es]=Cliente de MUD
GenericName[et]=MUD-i klient
GenericName[fr]=Client MUD (Donjon Multi Utilisateurs)
GenericName[nl]=MUD-client
GenericName[pt]=Cliente de MUD
GenericName[pt_BR]=Cliente MUD
GenericName[sv]=MUD-klient
GenericName[uk]=Клієнт MUD
GenericName[x-test]=xxMUD clientxx
Comment=MUD client
Comment[es]=Cliente de MUD
Comment[et]=MUD-i klient
Comment[fr]=Client MUD (Donjon Multi Utilisateurs)
Comment[nl]=MUD-client
Comment[pt]=Cliente de MUD
Comment[pt_BR]=Cliente MUD
Comment[sv]=MUD-klient
Comment[uk]=Клієнт MUD
Comment[x-test]=xxMUD clientxx
Terminal=false
......@@ -206,8 +206,7 @@ public:
}
int time = timer->tickTimeout ();
if (time > 0)
am->invokeEvent ("message", sess, i18n ("Timer ticks in ") + QString::number(time) +
((time > 1) ? i18n (" seconds.") : i18n (" second.")));
am->invokeEvent ("message", sess, i18np ("Timer ticks in 1 second.", "Timer ticks in %1 seconds.", QString::number(time)));
else
am->invokeEvent ("message", sess, i18n ("Timer ticks right now."));
}
......
......@@ -135,7 +135,7 @@ void cAliasEditor::createGUI(QWidget *parent)
d->rcmd = new KTextEdit (basicPage);
d->rcmd->setWordWrapMode (QTextOption::NoWrap);
rcl->setBuddy (d->rcmd);
d->rcmd->setWhatsThis( i18n ("Command(s) that will replace command you've entered."));
d->rcmd->setWhatsThis( i18n ("Command(s) that will replace command you have entered."));
//test area
QGroupBox *testarea = new QGroupBox (i18n ("Test area"), basicTab);
......@@ -209,7 +209,7 @@ void cAliasEditor::createGUI(QWidget *parent)
d->check5 = new QCheckBox (i18n ("Global matching"), options);
d->check5->setWhatsThis( i18n ("<p>With global matching, one alias/trigger can match multiple "
"times, if it contains the pattern more than once. For example, if pattern is abc, "
"it matches only once on abcdabcd of global matching is off, but twice if it's on. "
"it matches only once on abcdabcd of global matching is off, but twice if it is on. "
"For each match, the requested actions are performed - so the commands can be sent "
"multiple times, once per match.</p>"
"<p>Note that failing the condition doesn't terminate scanning, so you can use "
......
......@@ -51,7 +51,7 @@ cValue cExpResolver::function_call (const QString &functionName, list<cValue> &a
{
if (!cMacroManager::self()->functionExists (functionName)) {
cActionManager::self()->invokeEvent ("message", sess,
i18n ("Function %1 does not exist - assuming empty return value.").arg (functionName));
i18n ("Function %1 does not exist - assuming empty return value.", functionName));
return cValue::empty();
}
return cMacroManager::self()->callFunction (functionName, arguments, sess, queue);
......
......@@ -476,7 +476,10 @@ void cList::load (QXmlStreamReader *reader)
if (reader->hasError()) {
d->hasError = true;
d->lastError = i18n ("Error at line ") + QString::number (reader->lineNumber()) + i18n(", column ") + QString::number (reader->columnNumber()) + QString (": ") + reader->errorString();
d->lastError = i18n ("Error at line %1, column %2: %3",
QString::number (reader->lineNumber()),
QString::number (reader->columnNumber()),
reader->errorString());
}
listLoaded (); // the list is loaded now
......
......@@ -281,14 +281,14 @@ void cListEditor::saveDataToObject ()
if (obj->isGroup()) {
cListGroup *g = obj->list()->group (d->guiData.name);
if (g) {
KMessageBox::sorry (this, i18n ("Can not rename the group, as a group with such name already exists."));
KMessageBox::sorry (this, i18n ("Cannot rename the group, as a group with this name already exists."));
return;
}
obj->list()->renameGroup ((cListGroup *) obj, d->guiData.name);
} else {
cListObject *o = obj->list()->getObject (d->guiData.name);
if (o) {
KMessageBox::sorry (this, i18n ("Can not rename the object, as an object with such name already exists."));
KMessageBox::sorry (this, i18n ("Cannot rename the object, as an object with this name already exists."));
return;
}
obj->list()->setObjectName (obj, d->guiData.name);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment