movieretitle/Makefile
movieretitle/src/Makefile
+movieretitle/po/Makefile
moviecut/Makefile
moviecut/src_cc/Makefile
-SUBDIRS = src
+SUBDIRS = src po
EXTRA_DIST = Readme-MovieRetitle-1.2.txt
--- /dev/null
+#
+# to use this for the localisation of other plugins,
+# just change the DOMAIN to the name of the Plugin.
+# It is assumed, that the domain ist the same as
+# the directory name of the plugin.
+#
+
+DOMAIN=MovieRetitle
+installdir = /usr/lib/enigma2/python/Plugins/Extensions/$(DOMAIN)
+#GETTEXT=./pygettext.py
+GETTEXT=xgettext
+
+#MSGFMT = ./msgfmt.py
+MSGFMT = msgfmt
+
+LANGS := de
+LANGPO := $(foreach LANG, $(LANGS),$(LANG).po)
+LANGMO := $(foreach LANG, $(LANGS),$(LANG).mo)
+
+default: $(DOMAIN).pot $(LANGPO) merge $(LANGMO)
+ for lang in $(LANGS); do \
+ mkdir -p $$lang/LC_MESSAGES; \
+ cp $$lang.mo $$lang/LC_MESSAGES/$(DOMAIN).mo; \
+ done
+
+merge:
+ for lang in $(LANGS); do \
+ msgmerge --no-location -s -N -U $$lang.po $(DOMAIN).pot; \
+ done
+
+
+# the TRANSLATORS: allows putting translation comments before the to-be-translated line.
+$(DOMAIN).pot:
+ $(GETTEXT) -L python --add-comments="TRANSLATORS:" -d $(DOMAIN) -s -o $(DOMAIN).pot ../src/*.py
+ msguniq -o $(DOMAIN)uniq.pot $(DOMAIN).pot
+ $(RM) $(DOMAIN).pot
+ mv $(DOMAIN)uniq.pot $(DOMAIN).pot
+
+.PHONY: $(DOMAIN).pot
+
+
+%.mo: %.po
+ $(MSGFMT) -o $@ $<
+
+%.po:
+ msginit -l $@ -o $@ -i $(DOMAIN).pot --no-translator
+
+CLEANFILES = $(foreach LANG, $(LANGS),$(LANG).mo)
+
+clean-local:
+ $(RM) -r $(LANGS)
+
+install-data-am: default
+ for lang in $(LANGS); do \
+ mkdir -p $(DESTDIR)$(installdir)/locale/$$lang/LC_MESSAGES; \
+ cp $$lang.mo $(DESTDIR)$(installdir)/locale/$$lang/LC_MESSAGES/$(DOMAIN).mo; \
+ done
--- /dev/null
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-02-14 21:40+0100\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: 8bit\n"
+
+#: ../src/plugin.py:51
+msgid "Cancel"
+msgstr ""
+
+#: ../src/plugin.py:20
+msgid "Change name..."
+msgstr ""
+
+#: ../src/plugin.py:91
+msgid "Choose target folder"
+msgstr ""
+
+#: ../src/plugin.py:72
+msgid "Description"
+msgstr ""
+
+#: ../src/plugin.py:281
+#, python-format
+msgid "Failed to move the movie %s to %s in the background"
+msgstr ""
+
+#: ../src/plugin.py:70
+msgid "Filename"
+msgstr ""
+
+#: ../src/plugin.py:68
+msgid "Location"
+msgstr ""
+
+#: ../src/plugin.py:50
+msgid "OK"
+msgstr ""
+
+#: ../src/plugin.py:288
+#, python-format
+msgid "Successfully moved the movie %s"
+msgstr ""
+
+#: ../src/plugin.py:128
+#, python-format
+msgid ""
+"Target file %s.ts already exist.\n"
+"Do you want to replace it?"
+msgstr ""
+
+#: ../src/plugin.py:240
+#, python-format
+msgid "The movie is moved in the background from %s to %s."
+msgstr ""
+
+#: ../src/plugin.py:132
+msgid "The target directory is not found. The file is not renamed."
+msgstr ""
+
+#: ../src/plugin.py:71
+msgid "Title"
+msgstr ""
--- /dev/null
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Enigma 2 MovieRetitle Plugin\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-02-14 21:40+0100\n"
+"PO-Revision-Date: 2009-02-14 21:47+0100\n"
+"Last-Translator: Moritz Venn <moritz.venn@freaque.net>\n"
+"Language-Team: german <de@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "Cancel"
+msgstr "Abbrechen"
+
+msgid "Change name..."
+msgstr "Umbenennen..."
+
+msgid "Choose target folder"
+msgstr "Zielverzeichnis wählen"
+
+msgid "Description"
+msgstr "Beschreibung"
+
+#, python-format
+msgid "Failed to move the movie %s to %s in the background"
+msgstr "Konnte den Film %s nicht im Hintergrund nach %s verschieben"
+
+msgid "Filename"
+msgstr "Dateiname"
+
+msgid "Location"
+msgstr "Ort"
+
+msgid "OK"
+msgstr "OK"
+
+#, python-format
+msgid "Successfully moved the movie %s"
+msgstr "Der Film %s wurde erfolgreich verschoben"
+
+#, python-format
+msgid ""
+"Target file %s.ts already exist.\n"
+"Do you want to replace it?"
+msgstr ""
+"Zieldatei %s.ts existiert bereits.\n"
+"Die Datei ersetzen?"
+
+#, python-format
+msgid "The movie is moved in the background from %s to %s."
+msgstr "Der Film wird im Hintergrund von %s nach %s verschoben."
+
+msgid "The target directory is not found. The file is not renamed."
+msgstr "Zielordner nicht gefunden. Die Datei wird nicht umbenannt."
+
+msgid "Title"
+msgstr "Titel"
+# -*- coding: utf-8 -*-
+from Components.Language import language
+from Tools.Directories import resolveFilename, SCOPE_PLUGINS, SCOPE_LANGUAGE
+from os import environ as os_environ
+import gettext
+
+def localeInit():
+ lang = language.getLanguage()[:2] # getLanguage returns e.g. "fi_FI" for "language_country"
+ os_environ["LANGUAGE"] = lang # Enigma doesn't set this (or LC_ALL, LC_MESSAGES, LANG). gettext needs it!
+ gettext.bindtextdomain("MovieRetitle", resolveFilename(SCOPE_PLUGINS, "Extensions/MovieRetitle/locale"))
+
+def _(txt):
+ t = gettext.dgettext("MovieRetitle", txt)
+ if t == txt:
+ print "[MovieRetitle] fallback to default translation for", txt
+ t = gettext.gettext(txt)
+ return t
+
+localeInit()
+language.addCallback(localeInit)
+
+# for localized messages
+from . import _
+
from Plugins.Plugin import PluginDescriptor
from Screens.Screen import Screen
from Screens.MessageBox import MessageBox