Skip to content

Commit

Permalink
setup language localisation (plugin part)
Browse files Browse the repository at this point in the history
  • Loading branch information
plnick committed Nov 10, 2013
1 parent ea0d8f2 commit 84ffbc0
Show file tree
Hide file tree
Showing 38 changed files with 285 additions and 1 deletion.
67 changes: 67 additions & 0 deletions locale/OpenWebif.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
msgid ""
msgstr ""
"Project-Id-Version: OpenWebif\n"
"POT-Creation-Date: 2013-11-10 11:55+0100\n"
"PO-Revision-Date: \n"
"Last-Translator: plnick\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-15\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.5.4\n"
"X-Poedit-Basepath: .\n"
"X-Poedit-SearchPath-0: ../plugin\n"

msgid "Cancel"
msgstr ""

msgid "Save"
msgstr ""

msgid "OpenWebif url: http://yourip:port"
msgstr ""

msgid "OpenWebInterface Enabled"
msgstr ""

msgid "Http port"
msgstr ""

msgid "Enable Http Authentication"
msgstr ""

msgid "Enable Https"
msgstr ""

msgid "Https port"
msgstr ""

msgid "Smart services renaming for XBMC"
msgstr ""

msgid "Enable Parental Control"
msgstr ""

msgid "Add service name to stream information"
msgstr ""

msgid "OpenWebif Configuration"
msgstr ""

msgid "New"
msgstr ""

msgid "Services"
msgstr ""

msgid "Cable"
msgstr ""

msgid "Terrestrial"
msgstr ""

msgid "W"
msgstr ""

msgid "E"
msgstr ""
68 changes: 68 additions & 0 deletions locale/de.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
msgid ""
msgstr ""
"Project-Id-Version: OpenWebif\n"
"POT-Creation-Date: 2013-11-10 11:55+0100\n"
"PO-Revision-Date: \n"
"Last-Translator: plnick\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-15\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.5.4\n"
"X-Poedit-Basepath: .\n"
"Language: de\n"
"X-Poedit-SearchPath-0: ../plugin\n"

msgid "Cancel"
msgstr "Abbrechen"

msgid "Save"
msgstr "Speichern"

msgid "OpenWebif url: http://yourip:port"
msgstr "OpenWebif URL : http://ip_des_receivers:port"

msgid "OpenWebInterface Enabled"
msgstr "OpenWebinterface einschalten"

msgid "Http port"
msgstr "Port für http"

msgid "Enable Http Authentication"
msgstr "Authentifizierung für http aktivieren"

msgid "Enable Https"
msgstr "Aktivierung von https"

msgid "Https port"
msgstr "Port für https"

msgid "Smart services renaming for XBMC"
msgstr "Sendernamen für XBMC umbenennen"

msgid "Enable Parental Control"
msgstr "Kindersicherung aktivieren"

msgid "Add service name to stream information"
msgstr "Servicenamen zu den Streaminformationen hinzufügen"

msgid "OpenWebif Configuration"
msgstr "OpenWebif Konfiguration"

msgid "New"
msgstr "Neu"

msgid "Services"
msgstr "Sender"

msgid "Cable"
msgstr "Kabel"

msgid "Terrestrial"
msgstr "Terrestrisch"

msgid "W"
msgstr "W"

msgid "E"
msgstr "O"
20 changes: 20 additions & 0 deletions plugin/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-

from Components.Language import language
from Tools.Directories import resolveFilename, SCOPE_PLUGINS
import gettext

PluginLanguageDomain = "OpenWebif"
PluginLanguagePath = "Extensions/OpenWebif/locale"

def localeInit():
gettext.bindtextdomain(PluginLanguageDomain, resolveFilename(SCOPE_PLUGINS, PluginLanguagePath))

def _(txt):
t = gettext.dgettext(PluginLanguageDomain, txt)
if t == txt:
t = gettext.gettext(txt)
return t

localeInit()
language.addCallback(localeInit)
2 changes: 2 additions & 0 deletions plugin/backport/OrderedDict.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-

# Backport of OrderedDict() class that runs on Python 2.4, 2.5, 2.6, 2.7 and pypy.
# Passes Python2.7's test suite and incorporates all the latest updates.

Expand Down
2 changes: 2 additions & 0 deletions plugin/controllers/AT.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-

##############################################################################
# 2013 E2OpenPlugins #
# #
Expand Down
2 changes: 2 additions & 0 deletions plugin/controllers/BQE.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-

##############################################################################
# 2013 E2OpenPlugins #
# #
Expand Down
2 changes: 2 additions & 0 deletions plugin/controllers/ER.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-

##############################################################################
# 2013 E2OpenPlugins #
# #
Expand Down
2 changes: 2 additions & 0 deletions plugin/controllers/ajax.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-

##############################################################################
# 2011 E2OpenPlugins #
# #
Expand Down
2 changes: 2 additions & 0 deletions plugin/controllers/api.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-

from web import WebController

class ApiController(WebController):
Expand Down
2 changes: 2 additions & 0 deletions plugin/controllers/base.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-

##############################################################################
# 2011 E2OpenPlugins #
# #
Expand Down
2 changes: 2 additions & 0 deletions plugin/controllers/file.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-

##############################################################################
# 2011 E2OpenPlugins #
# #
Expand Down
2 changes: 2 additions & 0 deletions plugin/controllers/ipkg.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-

##############################################################################
# 2011 E2OpenPlugins #
# #
Expand Down
2 changes: 2 additions & 0 deletions plugin/controllers/mobile.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-

##############################################################################
# 2011 E2OpenPlugins #
# #
Expand Down
2 changes: 2 additions & 0 deletions plugin/controllers/models/audiotrack.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-

from Tools.ISO639 import LanguageCodes

def getAudioTracks(session):
Expand Down
2 changes: 2 additions & 0 deletions plugin/controllers/models/config.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-

from enigma import eEnv
from Components.SystemInfo import SystemInfo
from Components.config import config
Expand Down
2 changes: 2 additions & 0 deletions plugin/controllers/models/control.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-

##############################################################################
# 2011 E2OpenPlugins #
# #
Expand Down
2 changes: 2 additions & 0 deletions plugin/controllers/models/grab.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-

##############################################################################
# 2011 E2OpenPlugins #
# #
Expand Down
2 changes: 2 additions & 0 deletions plugin/controllers/models/info.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-

##############################################################################
# 2011 E2OpenPlugins #
# #
Expand Down
2 changes: 2 additions & 0 deletions plugin/controllers/models/locations.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-

##############################################################################
# 2011 E2OpenPlugins #
# #
Expand Down
2 changes: 2 additions & 0 deletions plugin/controllers/models/mediaplayer.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-

from Tools.Directories import fileExists, resolveFilename, SCOPE_PLAYLIST
from Components.FileList import FileList
from enigma import eServiceReference
Expand Down
2 changes: 2 additions & 0 deletions plugin/controllers/models/message.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-

##############################################################################
# 2011 E2OpenPlugins #
# #
Expand Down
2 changes: 2 additions & 0 deletions plugin/controllers/models/movies.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-

##############################################################################
# 2011 E2OpenPlugins #
# #
Expand Down
2 changes: 2 additions & 0 deletions plugin/controllers/models/plugins.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-

from Tools.Directories import resolveFilename, SCOPE_PLUGINS
from Components.PluginComponent import plugins

Expand Down
2 changes: 2 additions & 0 deletions plugin/controllers/models/servicelist.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-

##############################################################################
# 2011 E2OpenPlugins #
# #
Expand Down
2 changes: 2 additions & 0 deletions plugin/controllers/models/services.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-

##############################################################################
# 2011 E2OpenPlugins #
# #
Expand Down
2 changes: 2 additions & 0 deletions plugin/controllers/models/stream.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-

##############################################################################
# 2011 E2OpenPlugins #
# #
Expand Down
2 changes: 2 additions & 0 deletions plugin/controllers/models/timers.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-

##############################################################################
# 2011 E2OpenPlugins #
# #
Expand Down
2 changes: 2 additions & 0 deletions plugin/controllers/models/volume.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-

##############################################################################
# 2011 E2OpenPlugins #
# #
Expand Down
2 changes: 2 additions & 0 deletions plugin/controllers/root.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-

##############################################################################
# 2011 E2OpenPlugins #
# #
Expand Down
2 changes: 2 additions & 0 deletions plugin/controllers/stream.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-

##############################################################################
# 2011 E2OpenPlugins #
# #
Expand Down
2 changes: 2 additions & 0 deletions plugin/controllers/transcoding.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-

##############################################################################
# 2013 E2OpenPlugins #
# #
Expand Down
2 changes: 2 additions & 0 deletions plugin/controllers/web.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-

##############################################################################
# 2011 E2OpenPlugins #
# #
Expand Down
2 changes: 2 additions & 0 deletions plugin/controllers/wol.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-

##############################################################################
# 2013 E2OpenPlugins #
# #
Expand Down
2 changes: 2 additions & 0 deletions plugin/httpserver.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-

##############################################################################
# 2011 E2OpenPlugins #
# #
Expand Down
11 changes: 10 additions & 1 deletion plugin/plugin.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-

##############################################################################
# <<< OpenWebif >>> #
# #
Expand All @@ -24,6 +26,8 @@

from httpserver import HttpdStart, HttpdStop, HttpdRestart

from __init__ import _

config.OpenWebif = ConfigSubsection()
config.OpenWebif.enabled = ConfigYesNo(default=True)
# Use temporary port 8088 to avoid conflict with Webinterface
Expand All @@ -46,7 +50,7 @@

class OpenWebifConfig(Screen, ConfigListScreen):
skin = """
<screen position="center,center" size="700,340" title=_("OpenWebif Configuration")>
<screen position="center,center" size="700,340" title="OpenWebif Configuration">
<widget name="lab1" position="10,30" halign="center" size="680,60" zPosition="1" font="Regular;24" valign="top" transparent="1" />
<widget name="config" position="10,100" size="680,180" scrollbarMode="showOnDemand" />
<ePixmap position="140,290" size="140,40" pixmap="skin_default/buttons/red.png" alphatest="on" />
Expand Down Expand Up @@ -85,6 +89,11 @@ def __init__(self, session):
self["config"].list = self.list
self["config"].l.setList(self.list)

self.onLayoutFinish.append(self.setWindowTitle)

def setWindowTitle(self):
self.setTitle(_("OpenWebif Configuration"))

def keySave(self):
for x in self["config"].list:
x[1].save()
Expand Down
2 changes: 2 additions & 0 deletions plugin/sslcertificate.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-

##############################################################################
# 2011 E2OpenPlugins #
# #
Expand Down
10 changes: 10 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# -*- coding: utf-8 -*-

from distutils.core import setup
import setup_translate

pkg = 'Extensions.OpenWebif'
setup (name = 'enigma2-plugin-extensions-openwebif',
description = 'Control your receiver with a browser',
cmdclass = setup_translate.cmdclass,
)
Loading

0 comments on commit 84ffbc0

Please sign in to comment.