diff options
Diffstat (limited to 'build_tools/larch8/liblarch/i18n')
-rw-r--r-- | build_tools/larch8/liblarch/i18n/de/LC_MESSAGES/de.po | 61 | ||||
-rw-r--r-- | build_tools/larch8/liblarch/i18n/de/LC_MESSAGES/liblarch.mo | bin | 0 -> 1241 bytes | |||
-rwxr-xr-x | build_tools/larch8/liblarch/i18n/i18n.py | 61 | ||||
-rwxr-xr-x | build_tools/larch8/liblarch/i18n/i18n2.py | 31 | ||||
-rw-r--r-- | build_tools/larch8/liblarch/i18n/liblarch.pot | 61 |
5 files changed, 214 insertions, 0 deletions
diff --git a/build_tools/larch8/liblarch/i18n/de/LC_MESSAGES/de.po b/build_tools/larch8/liblarch/i18n/de/LC_MESSAGES/de.po new file mode 100644 index 0000000..eccec24 --- /dev/null +++ b/build_tools/larch8/liblarch/i18n/de/LC_MESSAGES/de.po @@ -0,0 +1,61 @@ +# German translations for liblarch version 1 package. +# Copyright (C) 2010 Michael Towers +# Automatically generated, 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: liblarch-1\n" +"POT-Creation-Date: 2010-08-15 21:52+CEST\n" +"PO-Revision-Date: 2010-08-01 09:59+CEST\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: pygettext.py 1.5\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: rootrun.py:121 +msgid "Please enter (sudo) password:" +msgstr "Bitte (sudo) Passwort eingeben:" + +#: rootrun.py:128 +msgid "Please enter root password:" +msgstr "Bitte root-Passwort eingeben:" + +#: rootrun.py:148 +msgid "Operation cancelled" +msgstr "Operation abgebrochen" + +#: rootrun.py:161 +msgid "Incorrect password, try again:" +msgstr "Falsches Passwort, noch einmal versuchen" + +#: translation.py:60 +msgid "Document '%s' not found" +msgstr "DOkument '%s' nicht gefunden" + +#: uim/larcon.uim:46 +msgid "Quit" +msgstr "Schließen" + +#: uim/larcon.uim:47 +msgid "Exit the application, make no (further) changes" +msgstr "Schließe die Anwendung, keine (weiteren) Änderungen durchführen" + +#: uim/larcon.uim:70 +msgid "Help" +msgstr "Hilfe" + +#: uim/larcon.uim:71 +msgid "Show the help page" +msgstr "Zeige die Hilfsseite an" + +#: uim/larcon.uim:72 +msgid "Hide help" +msgstr "Hilfsseite schließen" + +#: uim/larcon.uim:73 +msgid "Hide the help page, return to main view" +msgstr "Verstecke die Hilfsseite, kehre zur Hauptansicht zurück" diff --git a/build_tools/larch8/liblarch/i18n/de/LC_MESSAGES/liblarch.mo b/build_tools/larch8/liblarch/i18n/de/LC_MESSAGES/liblarch.mo Binary files differnew file mode 100644 index 0000000..a6bf49b --- /dev/null +++ b/build_tools/larch8/liblarch/i18n/de/LC_MESSAGES/liblarch.mo diff --git a/build_tools/larch8/liblarch/i18n/i18n.py b/build_tools/larch8/liblarch/i18n/i18n.py new file mode 100755 index 0000000..28b60ef --- /dev/null +++ b/build_tools/larch8/liblarch/i18n/i18n.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python2 +# -*- coding: UTF-8 -*- + +#2010.08.15 +# Copyright 2010 Michael Towers + +""" +1) Generally something like: pygettext.py -p i18n -o liblarch.pot *.py + +I think poedit can do most of the processing, but the steps are: + +2) cd i18n ; msginit -i liblarch.pot -l de + +OR: +2a) to update a po file: + +cd i18n ; msgmerge -U liblarch.po liblarch.pot + +3) edit po file + +4) generate binary file: +cd i18n ; msgfmt -c -v -o liblarch.mo liblarch.po + +5) move the .mo file to i18n/de/LC_MESSAGES +""" + +import sys, os, shutil +from subprocess import call + +thisdir = os.path.dirname(os.path.realpath(__file__)) +basedir = os.path.dirname(thisdir) +os.chdir(basedir) + +if (len(sys.argv) < 2): + lang = "de" +else: + lang = sys.argv[1] +print "Generating internationalization for language '%s'\n" % lang +print " If you wanted a different language run 'i18n.py <language>'" +print " For example 'i18n.py fr'\n" + +dirs = [""] +allpy = [os.path.join(d, "*.py") for d in dirs] +alluim = [os.path.join('uim', "*.uim")] +call(["pygettext.py", "-p", thisdir, "-o", "liblarch.pot"] + allpy + alluim) + +os.chdir(thisdir) +langfile = lang + ".po" +pofile = os.path.join(lang, "LC_MESSAGES", langfile) +if os.path.isfile(pofile): + shutil.copy(pofile, ".") + call(["msgmerge", "-U", langfile, "liblarch.pot"]) +else: + call(["sed", "-i", "s|CHARSET|utf-8|", "liblarch.pot"]) + call(["msginit", "--no-translator", "-i", "liblarch.pot", "-l", lang]) + +lf = open("lang", "w") +lf.write(lang) +lf.close() + +print "Now edit '%s' and then run 'i18n2.py'" % langfile diff --git a/build_tools/larch8/liblarch/i18n/i18n2.py b/build_tools/larch8/liblarch/i18n/i18n2.py new file mode 100755 index 0000000..486e0d4 --- /dev/null +++ b/build_tools/larch8/liblarch/i18n/i18n2.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python2 +# -*- coding: UTF-8 -*- + +#2010.08.01 +# Copyright 2010 Michael Towers + +"""This is part 2 of the internationalization helper. +After editing liblarch.po, run this to compile it and copy it to the +correct location. +""" + +import os +from subprocess import call + +thisdir = os.path.dirname(os.path.realpath(__file__)) +os.chdir(thisdir) +lf = open("lang", "r") +lang = lf.read() +lf.close() +langfile = lang + ".po" + +print "Compiling internationalization for language '%s'\n" % lang +call(["msgfmt", "-c", "-v", "-o", "liblarch.mo", langfile]) + +podir = os.path.join(lang, "LC_MESSAGES") +if not os.path.isdir(podir): + os.makedirs(podir) +os.rename(langfile, os.path.join(podir, langfile)) +os.rename("liblarch.mo", os.path.join(podir, "liblarch.mo")) + +print "DONE!" diff --git a/build_tools/larch8/liblarch/i18n/liblarch.pot b/build_tools/larch8/liblarch/i18n/liblarch.pot new file mode 100644 index 0000000..ef84c64 --- /dev/null +++ b/build_tools/larch8/liblarch/i18n/liblarch.pot @@ -0,0 +1,61 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR ORGANIZATION +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-08-15 21:52+CEST\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: ENCODING\n" +"Generated-By: pygettext.py 1.5\n" + + +#: rootrun.py:121 +msgid "Please enter (sudo) password:" +msgstr "" + +#: rootrun.py:128 +msgid "Please enter root password:" +msgstr "" + +#: rootrun.py:148 +msgid "Operation cancelled" +msgstr "" + +#: rootrun.py:161 +msgid "Incorrect password, try again:" +msgstr "" + +#: translation.py:60 +msgid "Document '%s' not found" +msgstr "" + +#: uim/larcon.uim:46 +msgid "Quit" +msgstr "" + +#: uim/larcon.uim:47 +msgid "Exit the application, make no (further) changes" +msgstr "" + +#: uim/larcon.uim:70 +msgid "Help" +msgstr "" + +#: uim/larcon.uim:71 +msgid "Show the help page" +msgstr "" + +#: uim/larcon.uim:72 +msgid "Hide help" +msgstr "" + +#: uim/larcon.uim:73 +msgid "Hide the help page, return to main view" +msgstr "" + |