mostly setting the correct translation domain
wilder-5.14
Lukáš Tinkl 12 years ago
parent bfebf2fb2e
commit 01853d48d8
  1. 2
      ksmserver/CMakeLists.txt
  2. 1
      ksmserver/client.h
  3. 2
      ksmserver/legacy.cpp
  4. 71
      ksmserver/main.cpp
  5. 3
      ksmserver/screenlocker/CMakeLists.txt
  6. 3
      ksmserver/screenlocker/greeter/CMakeLists.txt
  7. 6
      ksmserver/screenlocker/greeter/fallbacktheme/Greeter.qml
  8. 10
      ksmserver/screenlocker/greeter/fallbacktheme/SessionSwitching.qml
  9. 4
      ksmserver/screenlocker/greeter/main.cpp
  10. 3
      ksmserver/server.cpp
  11. 2
      ksmserver/server.h
  12. 7
      ksmserver/startup.cpp
  13. 10
      ksmserver/themes/contour/main.qml

@ -1,5 +1,7 @@
project(ksmserver)
add_definitions(-DTRANSLATION_DOMAIN=\"ksmserver\")
add_subdirectory( tests )
#
if(NOT WIN32)

@ -28,7 +28,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// needed to avoid clash with INT8 defined in X11/Xmd.h on solaris
#define QT_CLEAN_NAMESPACE 1
#include <kapplication.h>
#include <kworkspace.h>
#include "server.h"

@ -44,7 +44,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <kconfig.h>
#include <kconfiggroup.h>
#include <kglobal.h>
#include <KSharedConfig>
#include <kshell.h>
#include <kdebug.h>
#include <kwindowsystem.h>

@ -33,14 +33,12 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <KMessageBox>
#include <QtDBus/QtDBus>
#include <k4aboutdata.h>
#include <kcmdlineargs.h>
#include <kconfiggroup.h>
#include <kdbusservice.h>
#include <kdebug.h>
#include <klocale.h>
#include <kglobal.h>
#include <KLocalizedString>
#include <kconfig.h>
#include <KSharedConfig>
#include <kmanagerselection.h>
#include <kwindowsystem.h>
#include "server.h"
@ -135,47 +133,47 @@ void checkComposite()
void sanity_check( int argc, char* argv[] )
{
QString msg;
QByteArray path = getenv("HOME");
QByteArray readOnly = getenv("KDE_HOME_READONLY");
QByteArray path = qgetenv("HOME");
const QByteArray readOnly = qgetenv("KDE_HOME_READONLY");
if (path.isEmpty())
{
msg = QLatin1String("$HOME not set!");
msg = i18n("$HOME not set!");
}
if (msg.isEmpty() && access(path.data(), W_OK))
{
if (errno == ENOENT)
msg = QStringLiteral("$HOME directory (%1) does not exist.");
msg = i18n("$HOME directory (%1) does not exist.");
else if (readOnly.isEmpty())
msg = QStringLiteral("No write access to $HOME directory (%1).");
msg = i18n("No write access to $HOME directory (%1).");
}
if (msg.isEmpty() && access(path.data(), R_OK))
{
if (errno == ENOENT)
msg = QStringLiteral("$HOME directory (%1) does not exist.");
msg = i18n("$HOME directory (%1) does not exist.");
else
msg = QStringLiteral("No read access to $HOME directory (%1).");
msg = i18n("No read access to $HOME directory (%1).");
}
if (msg.isEmpty() && readOnly.isEmpty() && !writeTest(path))
{
if (errno == ENOSPC)
msg = QStringLiteral("$HOME directory (%1) is out of disk space.");
msg = i18n("$HOME directory (%1) is out of disk space.");
else
msg = QStringLiteral("Writing to the $HOME directory (%1) failed with\n "
"the error '")+QString::fromLocal8Bit(strerror(errno))+QStringLiteral("'");
msg = i18n("Writing to the $HOME directory (%2) failed with "
"the error '%1'", QString::fromLocal8Bit(strerror(errno)));
}
if (msg.isEmpty())
{
path = getenv("ICEAUTHORITY");
if (path.isEmpty())
{
path = getenv("HOME");
path = qgetenv("HOME");
path += "/.ICEauthority";
}
if (access(path.data(), W_OK) && (errno != ENOENT))
msg = QStringLiteral("No write access to '%1'.");
msg = i18n("No write access to '%1'.");
else if (access(path.data(), R_OK) && (errno != ENOENT))
msg = QStringLiteral("No read access to '%1'.");
msg = i18n("No read access to '%1'.");
}
if (msg.isEmpty())
{
@ -185,10 +183,10 @@ void sanity_check( int argc, char* argv[] )
if (!writeTest(path))
{
if (errno == ENOSPC)
msg = QStringLiteral("Temp directory (%1) is out of disk space.");
msg = i18n("Temp directory (%1) is out of disk space.");
else
msg = QStringLiteral("Writing to the temp directory (%1) failed with\n "
"the error '")+QString::fromLocal8Bit(strerror(errno))+QStringLiteral("'");
msg = i18n("Writing to the temp directory (%2) failed with\n "
"the error '%1'", QString::fromLocal8Bit(strerror(errno)));
}
}
if (msg.isEmpty() && (path != "/tmp"))
@ -197,36 +195,35 @@ void sanity_check( int argc, char* argv[] )
if (!writeTest(path))
{
if (errno == ENOSPC)
msg = QStringLiteral("Temp directory (%1) is out of disk space.");
msg = i18n("Temp directory (%1) is out of disk space.");
else
msg = QStringLiteral("Writing to the temp directory (%1) failed with\n "
"the error '")+QString::fromLocal8Bit(strerror(errno))+QStringLiteral("'");
msg = i18n("Writing to the temp directory (%2) failed with\n "
"the error '%1'", QString::fromLocal8Bit(strerror(errno)));
}
}
if (msg.isEmpty())
{
path += "/.ICE-unix";
if (access(path.data(), W_OK) && (errno != ENOENT))
msg = QStringLiteral("No write access to '%1'.");
msg = i18n("No write access to '%1'.");
else if (access(path.data(), R_OK) && (errno != ENOENT))
msg = QStringLiteral("No read access to '%1'.");
msg = i18n("No read access to '%1'.");
}
if (!msg.isEmpty())
{
const char *msg_pre =
"The following installation problem was detected\n"
"while trying to start KDE:"
msg = msg.arg(QFile::decodeName(path));
const QString msg_pre =
i18n("The following installation problem was detected\n"
"while trying to start KDE:") +
"\n\n ";
const char *msg_post = "\n\nKDE is unable to start.\n";
fputs(msg_pre, stderr);
fprintf(stderr, "%s", qPrintable(msg.arg(QFile::decodeName(path))));
fputs(msg_post, stderr);
const QString msg_post = i18n("\n\nKDE is unable to start.\n");
fputs(msg_pre.toUtf8().constData(), stderr);
fprintf(stderr, "%s", msg.toUtf8().constData());
fputs(msg_post.toUtf8().constData(), stderr);
QApplication a(argc, argv);
QString qmsg = QString::fromLatin1(msg_pre) +
msg.arg(QFile::decodeName(path)) +
QString::fromLatin1(msg_post);
KMessageBox::error(0, qmsg, QStringLiteral("KDE Workspace installation problem!"));
const QString qmsg = msg_pre + msg + msg_post;
KMessageBox::error(0, qmsg, i18n("Plasma Workspace installation problem!"));
exit(255);
}
}
@ -250,7 +247,7 @@ extern "C" Q_DECL_EXPORT int kdemain( int argc, char* argv[] )
a->setQuitOnLastWindowClosed(false); // #169486
QCommandLineParser parser;
parser.setApplicationDescription(QString::fromLatin1(description));
parser.setApplicationDescription(i18n(description));
parser.addHelpOption();
parser.addVersionOption();

@ -1,3 +1,6 @@
remove_definitions(-DTRANSLATION_DOMAIN=\"ksmserver\")
add_definitions(-DTRANSLATION_DOMAIN=\"kscreenlocker\")
add_definitions(-DKDE_DEFAULT_DEBUG_AREA=1223)
add_subdirectory(kcheckpass)
add_subdirectory(greeter)

@ -1,3 +1,6 @@
remove_definitions(-DTRANSLATION_DOMAIN=\"kscreenlocker\")
add_definitions(-DTRANSLATION_DOMAIN=\"kscreenlocker_greet\")
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${KCheckPass_SOURCE_DIR}/kcheckpass

@ -102,7 +102,7 @@ Item {
AccelButton {
id: switchUser
label: i18n("&Switch Users")
label: i18nd("kscreenlocker_greet", "&Switch Users")
iconSource: "fork"
visible: switchUserEnabled
onClicked: switchUserClicked()
@ -110,7 +110,7 @@ Item {
AccelButton {
id: unlock
label: i18n("Un&lock")
label: i18nd("kscreenlocker_greet", "Un&lock")
iconSource: "object-unlocked"
enabled: !authenticator.graceLocked
onClicked: authenticator.tryUnlock(password.text)
@ -147,7 +147,7 @@ Item {
Connections {
target: authenticator
onFailed: {
root.notification = i18n("Unlocking failed");
root.notification = i18nd("kscreenlocker_greet", "Unlocking failed");
}
onGraceLockedChanged: {
if (!authenticator.graceLocked) {

@ -52,7 +52,7 @@ Item {
delegate: PlasmaComponents.ListItem {
content: PlasmaComponents.Label {
text: i18nc("thesession name and the location where the session is running (what vt)", "%1 (%2)", session, location)
text: i18ndc("kscreenlocker_greet", "thesession name and the location where the session is running (what vt)", "%1 (%2)", session, location)
}
}
highlight: PlasmaComponents.Highlight {
@ -73,7 +73,7 @@ Item {
PlasmaComponents.Label {
id: explainText
text: i18n("The current session will be hidden " +
text: i18nd("kscreenlocker_greet", "The current session will be hidden " +
"and a new login screen or an existing session will be displayed.\n" +
"An F-key is assigned to each session; " +
"F%1 is usually assigned to the first session, " +
@ -98,7 +98,7 @@ Item {
AccelButton {
id: activateSession
label: i18n("Activate")
label: i18nd("kscreenlocker_greet", "Activate")
iconSource: "fork"
onClicked: {
sessions.activateSession(userSessionsView.currentIndex);
@ -107,7 +107,7 @@ Item {
}
AccelButton {
id: newSession
label: i18n("Start New Session")
label: i18nd("kscreenlocker_greet", "Start New Session")
iconSource: "fork"
visible: sessions.startNewSessionSupported
onClicked: {
@ -117,7 +117,7 @@ Item {
}
AccelButton {
id: cancelSession
label: i18n("Cancel")
label: i18nd("kscreenlocker_greet", "Cancel")
iconSource: "dialog-cancel"
onClicked: cancel()
}

@ -50,6 +50,8 @@ static void signalHandler(int signum)
int main(int argc, char* argv[])
{
KLocalizedString::setApplicationDomain("kscreenlocker_greet");
ScreenLocker::UnlockApp app(argc, argv);
QCoreApplication::setApplicationName(QStringLiteral("kscreenlocker_greet"));
QCoreApplication::setApplicationVersion(QStringLiteral("0.1"));
@ -69,7 +71,7 @@ int main(int argc, char* argv[])
QStringLiteral("milliseconds"),
QStringLiteral("0"));
QCommandLineOption nolockOption(QStringLiteral("nolock"),
i18n("Don't show any lock user interface."));
i18n("Don't show any lock user interface."));
parser.addOption(testingOption);
parser.addOption(immediateLockOption);

@ -73,7 +73,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <kactioncollection.h>
#include <kauthorized.h>
#include <klocale.h>
#include <kglobal.h>
#include <kconfig.h>
#include <kdesktopfile.h>
#include <kapplication.h>
@ -612,8 +611,6 @@ KSMServer::KSMServer( const QString& windowManager, bool _only_local, bool locks
, logoutEffectWidget( NULL )
{
#ifdef COMPILE_SCREEN_LOCKER
KGlobal::locale()->insertCatalog(QLatin1String( "libkworkspace" ));
ScreenLocker::KSldApp::self();
if (lockscreen) {
ScreenLocker::KSldApp::self()->lock(ScreenLocker::EstablishLock::Immediate);

@ -44,9 +44,9 @@ extern "C" {
#include <QStringList>
#include <QObject>
#include <kapplication.h>
#include <kworkspace.h>
#include <kmessagebox.h>
#include <KConfigGroup>
#include <QTimer>
#include <QTime>
#include <QMap>

@ -29,7 +29,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************/
#include <kglobalsettings.h>
#include <QDir>
#include <krun.h>
#include <config-workspace.h>
@ -58,17 +57,13 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <limits.h>
#endif
#include <QPushButton>
#include <QTimer>
#include <QtDBus/QtDBus>
#include <klocale.h>
#include <kglobal.h>
#include <kconfig.h>
#include <kapplication.h>
#include <ktemporaryfile.h>
#include <knotification.h>
#include <kconfiggroup.h>
#include <KSharedConfig>
#include <kprocess.h>
#include "global.h"

@ -70,8 +70,8 @@ PlasmaCore.FrameSvgItem {
running = false
sleepButton.clicked(null)
}
automaticallyDoLabel.text = i18np("Sleeping in 1 second",
"Sleeping in %1 seconds", automaticallyDoSeconds)
automaticallyDoLabel.text = i18ndp("ksmserver", "Sleeping in 1 second",
"Sleeping in %1 seconds", automaticallyDoSeconds)
--automaticallyDoSeconds;
}
}
@ -103,7 +103,7 @@ PlasmaCore.FrameSvgItem {
id: lockScreenButton
iconSource: "system-lock-screen"
iconSize: shutdownUi.iconSize
text: i18n("Lock")
text: i18nd("ksmserver", "Lock")
font.pixelSize: 1.5*automaticallyDoLabel.font.pixelSize
onClicked: {
@ -117,7 +117,7 @@ PlasmaCore.FrameSvgItem {
id: sleepButton
iconSource: "system-suspend"
iconSize: shutdownUi.iconSize
text: i18n("Sleep")
text: i18n("ksmserver", "Sleep")
font.pixelSize: 1.5*automaticallyDoLabel.font.pixelSize
onClicked: {
@ -137,7 +137,7 @@ PlasmaCore.FrameSvgItem {
id: shutdownButton
iconSource: "system-shutdown"
iconSize: shutdownUi.iconSize
text: i18n("Turn off")
text: i18nd("ksmserver", "Turn off")
font.pixelSize: 1.5*automaticallyDoLabel.font.pixelSize
onClicked: {

Loading…
Cancel
Save