diff options
author | i026e <klev.paul@gmail.com> | 2016-12-15 09:34:32 +0300 |
---|---|---|
committer | i026e <klev.paul@gmail.com> | 2016-12-15 09:34:32 +0300 |
commit | 6cfb4deb267c8c5062ff38d90328c76497d21a1e (patch) | |
tree | 3ca6acfc645129886816afd36f34590fbe10e97e | |
parent | app mode (diff) | |
download | mime_types_editor-6cfb4deb267c8c5062ff38d90328c76497d21a1e.tar.gz mime_types_editor-6cfb4deb267c8c5062ff38d90328c76497d21a1e.tar.bz2 mime_types_editor-6cfb4deb267c8c5062ff38d90328c76497d21a1e.zip |
translations
-rw-r--r-- | Makefile | 32 | ||||
-rw-r--r-- | src/mime_editor.py | 2 |
2 files changed, 33 insertions, 1 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..07f3532 --- /dev/null +++ b/Makefile @@ -0,0 +1,32 @@ +export SHELL = sh + +PACKAGE = mime-editor-gui + +all: + +pot: + mkdir -p ./po + find . -iname "*.py" | xargs xgettext --default-domain="$(PACKAGE)" --sort-output --output="./po/$(PACKAGE).pot" + find . -iname "*.glade" | xargs xgettext --join-existing --sort-output -L Glade -k_ -kN_ --keyword=translatable --output="./po/$(PACKAGE).pot" + + sed -i 's/CHARSET/UTF-8/' po/$(PACKAGE).pot + sed -i 's/PACKAGE VERSION/$(PACKAGE) $(VERSION)/' po/$(PACKAGE).pot + sed -i 's/PACKAGE/$(PACKAGE)/' po/$(PACKAGE).pot + +update-po: pot + for i in po/*.po ;\ + do \ + mv $$i $${i}.old ; \ + (msgmerge $${i}.old po/$(PACKAGE).pot | msgattrib --no-obsolete > $$i) ; \ + rm $${i}.old ; \ + done + +translations: ./po/*.po + mkdir -p locale + @for po in $^; do \ + language=`basename $$po`; \ + language=$${language%%.po}; \ + target="locale/$$language/LC_MESSAGES"; \ + mkdir -p $$target; \ + msgfmt --output=$$target/$(PACKAGE).mo $$po; \ + done diff --git a/src/mime_editor.py b/src/mime_editor.py index ac30c9a..eb8931f 100644 --- a/src/mime_editor.py +++ b/src/mime_editor.py @@ -30,7 +30,7 @@ signal.signal(signal.SIGINT, signal.SIG_DFL) #handle Ctrl-C import mime_editor_app_mode import mime_editor_cat_mode -APP = os.path.join(DIR, "python-mime-editor-gui") +APP = os.path.join(DIR, "mime-editor-gui") GLADE_FILE = "ui_main_window.glade" editor_modes = { "app_mode" : mime_editor_app_mode.MainWidget, |