43 #include <kapplication.h>
44 #include <kaboutdata.h>
45 #include <kcmdlineargs.h>
48 #include <threadweaver/ThreadWeaver.h>
56 I18N_NOOP(
"Computer-aided translation system.\nDo not translate what had already been translated.");
58 int main(
int argc,
char **argv)
60 KAboutData about(
"lokalize", 0, ki18nc(
"@title",
"Lokalize"),
version, ki18n(
description),
61 KAboutData::License_GPL, ki18nc(
"@info:credit",
"(c) 2007-2013 Nick Shaforostoff\n(c) 1999-2006 The KBabel developers") );
62 about.addAuthor( ki18n(
"Nick Shaforostoff"), KLocalizedString(),
"shaforostoff@kde.ru" );
63 about.addCredit (ki18n(
"Google Inc."), ki18n(
"sponsored development as part of Google Summer Of Code program"), QByteArray(),
"http://google.com");
64 about.addCredit (ki18n(
"Translate-toolkit"), ki18n(
"provided excellent cross-format converting scripts"), QByteArray(),
"http://translate.sourceforge.net");
65 about.addCredit (ki18n(
"Viesturs Zarins"), ki18n(
"project tree merging translation+templates"),
"viesturs.zarins@mii.lu.lv", QByteArray());
66 about.addCredit (ki18n(
"Stephan Johach"), ki18n(
"bug fixing patches"),
"hunsum@gmx.de");
67 about.addCredit (ki18n(
"Chusslove Illich"), ki18n(
"bug fixing patches"),
"caslav.ilic@gmx.net");
68 about.addCredit (ki18n(
"Jure Repinc"), ki18n(
"testing and bug fixing"),
"jlp@holodeck1.com");
69 about.addCredit (ki18n(
"Stefan Asserhall"), ki18n(
"patches"),
"stefan.asserhall@comhem.se");
70 about.addCredit (ki18n(
"Papp Laszlo"), ki18n(
"bug fixing patches"),
"djszapi@archlinux.us");
71 about.addCredit (ki18n(
"Albert Astals Cid"), ki18n(
"XLIFF improvements"),
"aacid@kde.org");
73 KCmdLineArgs::init(argc, argv, &about);
75 KCmdLineOptions options;
77 options.add(
"noprojectscan", ki18n(
"Do not scan files of the project."));
78 options.add(
"project <filename>", ki18n(
"Load specified project."));
79 options.add(
"+[URL]", ki18n(
"Document to open" ));
80 KCmdLineArgs::addCmdLineOptions(options);
85 qDebug()<<qRegisterMetaType<DocPosition>();
86 qDebug()<<qRegisterMetaType<DocPos>();
87 qDebug()<<qRegisterMetaType<InlineTag>();
88 qDebug()<<qRegisterMetaType<CatalogString>();
89 qRegisterMetaTypeStreamOperators<InlineTag>(
"InlineTag");
90 qRegisterMetaTypeStreamOperators<CatalogString>(
"CatalogString");
94 if (app.isSessionRestored())
95 kRestoreMainWindows<LokalizeMainWindow>();
99 KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
101 if (!args->getOption(
"project").isEmpty())
106 QFileInfo projectFileInfo(args->getOption(
"project").toUtf8());
107 QString projectFilePath=projectFileInfo.canonicalFilePath();
108 if (projectFilePath.isEmpty())
109 projectFilePath=projectFileInfo.absoluteFilePath();
117 for (
int j=0; j<args->count(); j++)
118 urls << args->url(j);
128 ThreadWeaver::Weaver::instance()->dequeue();
137 qWarning()<<
"QCoreApplication::processEvents()...";
138 QCoreApplication::processEvents();
139 QCoreApplication::sendPostedEvents(0,0);
141 qWarning()<<
"Finishing Project jobs...";
146 QCoreApplication::processEvents();
147 QCoreApplication::sendPostedEvents(0,0);
150 qWarning()<<
"Finishing TM jobs...";
151 ThreadWeaver::Weaver::instance()->finish();
void setCompleteScan(bool enable)
ThreadWeaver::Weaver * weaver()
int main(int argc, char **argv)
static Project * instance()
static SettingsController * instance()
void load(const QString &file)
Lokalize MDI (tabbed) window.
void setMainWindowPtr(QWidget *w)
static const char description[]
static const char version[]