1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-17 02:52:12 +01:00

Translations. Support for German, French and Spanish to start with.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@162 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
dankers 2010-02-03 15:26:03 +00:00 committed by dankers
parent 3d7d85d195
commit 7973e92cc0
11 changed files with 25 additions and 84502 deletions

View File

@ -1,32 +1,20 @@
How To add translations to Qt Creator
=====================================
- Coordinate over the mailing list to avoid duplicate work.
- Add your language to the LANGUAGES line in translations.pro.
Don't qualify it with a country unless it is reasonable to expect
country-specific variants.
Skip this step if updating an existing translation, obviously.
- Run "make ts". This will complain if you are not building against
Qt 4.6 (or the master branch which will become it).
If your Qt version is too old, you may create a template by running
lconvert --drop-translations qtcreator_de.ts -o qtcreator_<yours>.ts
and adjusting the language attribute in the new .ts file. The downside
of this method is obviously that you will not be translating the newest
Creator sources (unless qtcreator_de.ts was completely up-to-date).
Of course, this method is not applicable if you are updating an existing
translation.
You may also request an up-to-date template from us.
The remaining steps do *not* require Qt 4.6 in any case.
- Fire up linguist and do the translation.
- Check in the modified .pro file and _only_ your .ts file.
- Make a merge request on gitorious.
- .qm files are generated as part of the regular build.
How To add translations to OpenPilot GCS
========================================
- Coordinate over the forum to avoid duplicate work.
- Add your language to the LANGUAGES line in translations.pro.
Don't qualify it with a country unless it is reasonable to expect
country-specific variants.
Skip this step if updating an existing translation, obviously.
- Run "make ts". This will complain if you are not building against
Qt 4.6
- Fire up linguist and do the translation.
- Check in the modified .pro file and _only_ your .ts file.
- Make a merge request on the forums.
- .qm files are generated as part of the regular build.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
include(../../../openpilotgcs.pri)
LANGUAGES = de es fr it ja pl ru sl
LANGUAGES = de es fr
# var, prepend, append
defineReplace(prependAll) {
@ -60,6 +60,6 @@ isEmpty(vcproj) {
}
qmfiles.files = $$prependAll(LANGUAGES, $$OUT_PWD/qtcreator_,.qm)
qmfiles.path = /share/qtcreator/translations
qmfiles.path = /share/openpilotgcs/translations
qmfiles.CONFIG += no_check_exist
INSTALLS += qmfiles

View File

@ -147,7 +147,7 @@ static inline QString prepareRemoteArgument(const QString &a)
return a;
}
// Send the arguments to an already running instance of Qt Creator
// Send the arguments to an already running instance of OpenPilot GCS
static bool sendArguments(SharedTools::QtSingleApplication &app, const QStringList &arguments)
{
if (!arguments.empty()) {
@ -201,7 +201,7 @@ static inline QStringList getPluginPaths()
int main(int argc, char **argv)
{
#ifdef Q_OS_MAC
// increase the number of file that can be opened in Qt Creator.
// increase the number of file that can be opened in OpenPilot GCS
struct rlimit rl;
getrlimit(RLIMIT_NOFILE, &rl);
rl.rlim_cur = rl.rlim_max;
@ -215,7 +215,7 @@ int main(int argc, char **argv)
QString locale = QLocale::system().name();
const QString &creatorTrPath = QCoreApplication::applicationDirPath()
+ QLatin1String(SHARE_PATH "/translations");
if (translator.load(QLatin1String("qtcreator_") + locale, creatorTrPath)) {
if (translator.load(QLatin1String("openpilotgcs_") + locale, creatorTrPath)) {
const QString &qtTrPath = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
const QString &qtTrFile = QLatin1String("qt_") + locale;
// Binary installer puts Qt tr files into creatorTrPath