diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile | 11 | ||||
-rw-r--r-- | README.Translators | 14 | ||||
-rwxr-xr-x | buildutil/pot2i18n.pl | 157 | ||||
-rw-r--r-- | conflictcheckonly.c | 125 | ||||
-rw-r--r-- | epgsearch.c | 4 | ||||
-rw-r--r-- | epgsearchonly.c | 97 | ||||
-rw-r--r-- | epgsearchtools.c | 1 | ||||
-rw-r--r-- | epgsearchtools.h | 1 | ||||
-rw-r--r-- | i18n-template.h | 38 | ||||
-rw-r--r-- | i18n.c | 32 | ||||
-rw-r--r-- | i18n.h | 39 | ||||
-rw-r--r-- | mainmenushortcut.c | 59 | ||||
-rw-r--r-- | quickepgsearch.c | 89 |
14 files changed, 6 insertions, 662 deletions
@@ -1,5 +1,4 @@ /.dependencies -/i18n-generated.h /doc/ /html/ /man/ @@ -133,7 +133,7 @@ DEFINES4 += $(EPGSEARCH_DEFINES) -DPLUGIN_NAME_I18N='"$(PLUGIN4)"' ### The object files (add further files here): -OBJS = afuzzy.o blacklist.o changrp.o confdloader.o conflictcheck.o conflictcheck_thread.o distance.o $(PLUGIN).o epgsearchcats.o epgsearchcfg.o epgsearchext.o epgsearchsetup.o epgsearchsvdrp.o epgsearchtools.o i18n.o mail.o md5.o menu_announcelist.o menu_blacklistedit.o menu_blacklists.o menu_commands.o menu_conflictcheck.o menu_deftimercheckmethod.o menu_dirselect.o menu_event.o menu_favorites.o menu_main.o menu_myedittimer.o menu_quicksearch.o menu_recsdone.o menu_search.o menu_searchactions.o menu_searchedit.o menu_searchresults.o menu_searchtemplate.o menu_switchtimers.o menu_templateedit.o menu_timersdone.o menu_whatson.o noannounce.o pending_notifications.o rcfile.o recdone.o recstatus.o searchtimer_thread.o services.o switchtimer.o switchtimer_thread.o templatefile.o timer_thread.o timerdone.o timerstatus.o uservars.o varparser.o +OBJS = afuzzy.o blacklist.o changrp.o confdloader.o conflictcheck.o conflictcheck_thread.o distance.o $(PLUGIN).o epgsearchcats.o epgsearchcfg.o epgsearchext.o epgsearchsetup.o epgsearchsvdrp.o epgsearchtools.o mail.o md5.o menu_announcelist.o menu_blacklistedit.o menu_blacklists.o menu_commands.o menu_conflictcheck.o menu_deftimercheckmethod.o menu_dirselect.o menu_event.o menu_favorites.o menu_main.o menu_myedittimer.o menu_quicksearch.o menu_recsdone.o menu_search.o menu_searchactions.o menu_searchedit.o menu_searchresults.o menu_searchtemplate.o menu_switchtimers.o menu_templateedit.o menu_timersdone.o menu_whatson.o noannounce.o pending_notifications.o rcfile.o recdone.o recstatus.o searchtimer_thread.o services.o switchtimer.o switchtimer_thread.o templatefile.o timer_thread.o timerdone.o timerstatus.o uservars.o varparser.o ifeq ($(REGEXLIB), pcre) LIBS += $(shell pcre-config --libs-posix) @@ -210,7 +210,7 @@ I18Npot = $(PODIR)/$(PLUGIN).pot msgfmt -c -o $@ $< $(I18Npot): $(wildcard *.[ch]) - xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP --msgid-bugs-address='<cwieninger@gmx.de>' -o $@ `ls $^` + xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP -kI18nTranslate --msgid-bugs-address='<cwieninger@gmx.de>' -o $@ `ls $^` %.po: $(I18Npot) msgmerge -U --no-wrap --no-location --backup=none -q $@ $< @@ -223,9 +223,6 @@ $(I18Nmsgs): $(LOCALEDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo .PHONY: i18n i18n: $(I18Nmsgs) $(I18Npot) -generate-i18n: i18n-template.h $(I18Npot) $(I18Npo) buildutil/pot2i18n.pl - buildutil/pot2i18n.pl $(I18Npot) i18n-template.h > i18n-generated.h - ### Targets: libvdr-$(PLUGIN).so: $(OBJS) @@ -247,7 +244,7 @@ libvdr-$(PLUGIN4).so: $(OBJS4) createcats: createcats.o Makefile $(CXX) $(CXXFLAGS) $(LDFLAGS) createcats.o -o $@ -dist: generate-i18n docs clean +dist: docs clean @-rm -rf $(TMPDIR)/$(ARCHIVE) @mkdir $(TMPDIR)/$(ARCHIVE) @cp -a * $(TMPDIR)/$(ARCHIVE) @@ -260,7 +257,7 @@ dist: generate-i18n docs clean @ln -sf README.git README @echo Distribution package created as $(PACKAGE).tgz -distfull: generate-i18n docs clean +distfull: docs clean @-rm -rf $(TMPDIR)/$(ARCHIVE) @mkdir $(TMPDIR)/$(ARCHIVE) @cp -a * $(TMPDIR)/$(ARCHIVE) diff --git a/README.Translators b/README.Translators index 5682e64..a0486eb 100644 --- a/README.Translators +++ b/README.Translators @@ -19,18 +19,8 @@ To do so please follow these steps: the po subdirectory. All entries with 'msgstr ""' should be filled with your translation. -3. To test your translations: - in vdr > 1.5.6: - simply recompile EPGSearch and check your changes. - in vdr < 1.5.7: - for backwards compatibility the translation is built from the - po files. To do so call - - make generate-i18n - - from EPGSearch's source directory and then recompile EPGSearch. - (this calls buildutil/pot2i18n.pl which may need to install Locale::PO - in the pearl cpan shell) +3. To test your translations, simply recompile EPGSearch and check + your changes. 4. When done please send me your po file or even better a patch for it, created like diff --git a/buildutil/pot2i18n.pl b/buildutil/pot2i18n.pl deleted file mode 100755 index 600879b..0000000 --- a/buildutil/pot2i18n.pl +++ /dev/null @@ -1,157 +0,0 @@ -#!/usr/bin/perl -# -# File: pot2i18n.pl - Convert plugin pot file into i18n.c-format -# Author: Dieter Hametner -# Version: 0.1 -# -# based on po2i18n.pl version 0.1 from Udo Richter -# -# See the po2i18n/README file for copyright information and how to -# reach the original author. Also general use is described there. -# -# This version uses the CPAN module Locale::PO to read the .pot and .po files -# which ensures, that these files are read correctly. -# -# The usage of pot2i18n.pl differs from po2i18n.pl that it requires as first -# argument the path to the plugins .pot file. There it then looks also for -# the translated .po files which are used to create the result. -# This version does not sort the msgids lexicaly (in contrast to po2i18n.pl) - -use strict; -use warnings; - -use Locale::PO; -use File::Basename; - -my @LANGS = ( - "en_US", - "de_DE", - "sl_SI", - "it_IT", - "nl_NL", - "pt_PT", - "fr_FR", - "nn_NO", - "fi_FI", - "pl_PL", - "es_ES", - "el_GR", - "sv_SE", - "ro_RO", - "hu_HU", - "ca_ES", - "ru_RU", - "hr_HR", - "et_EE", - "da_DK", - "cs_CZ", - "tr_TR" - ); - -my %VERS = ( - "en_US" => 10200, - "de_DE" => 10200, - "sl_SI" => 10200, - "it_IT" => 10200, - "nl_NL" => 10200, - "pt_PT" => 10200, - "fr_FR" => 10200, - "nn_NO" => 10200, - "fi_FI" => 10200, - "pl_PL" => 10200, - "es_ES" => 10200, - "el_GR" => 10200, - "sv_SE" => 10200, - "ro_RO" => 10200, - "hu_HU" => 10200, - "ca_ES" => 10200, - "ru_RU" => 10302, - "hr_HR" => 10307, - "et_EE" => 10313, - "da_DK" => 10316, - "cs_CZ" => 10342, - "tr_TR" => 10502 - ); - -die "Missing .pot file argument" unless $#ARGV >= 0; - -my $potfile = $ARGV[0]; -my $podir = dirname($potfile); - -my $potRef = Locale::PO->load_file_asarray($potfile); -shift; - -my %translations; - -foreach my $lang (@LANGS) { - $translations{$lang} = Locale::PO->load_file_ashash("$podir/$lang.po"); -} - -# debugging code: (may be removed) -#for my $po (@{$potRef}) { -# my $msgid = $po->msgid; -# -# print "UNTRANSLATED: ", $msgid, "\n"; -# next if $msgid eq "\"\""; -# foreach my $lang (@LANGS) { -# my $lhref = $translations{$lang}; -# my $lpo = ${$lhref}{$msgid}; -# $lpo = $po if !defined $lpo; -# -# my $msg = $lpo->msgstr; -# $msg = $lpo->msgid if !defined $msg; -# $msg = $msgid if ($lang eq "en_US"); -# print $lang, ": ", $msg, "\n"; -# } -# print "\n"; -#} -# -#exit; - -my $silent = 0; - -while (<>) { - my $line = $_; - - if ($line =~ /^\/\/ START I18N/) { - print "// START I18N - automatically generated by pot2i18n.pl\n"; - foreach my $po (@{$potRef}) { - my $msgid = $po->msgid; - next if $msgid eq "\"\""; - - my $head = " { "; - my $endif = ""; - my $versnum = 10200; - - for my $lang (@LANGS) { - if ($VERS{$lang} ne $versnum) { - $versnum = $VERS{$lang}; - print $endif; - print "#if VDRVERSNUM >= $versnum\n"; - $endif = "#endif\n"; - } - - my $lhref = $translations{$lang}; - my $lpo = ${$lhref}{$msgid}; - $lpo = $po if !defined $lpo; - - my $msgstr = $lpo->msgstr; - $msgstr = $lpo->msgid if !defined $msgstr; - $msgstr = $msgid if ($lang eq "en_US"); - - print "$head$msgstr,\n"; - $head = " "; - } - print $endif; - print " },\n"; - } - $silent = 1; - } - - if (!$silent) { print $line; } - - if ($line =~ /^\/\/ END I18N/) { - print "// END I18N - automatically generated by pot2i18n.pl\n"; - $silent = 0; - } -} diff --git a/conflictcheckonly.c b/conflictcheckonly.c index 334b536..898192c 100644 --- a/conflictcheckonly.c +++ b/conflictcheckonly.c @@ -24,10 +24,6 @@ The project's page is at http://winni.vdr-developer.org/epgsearch #include <string> #include <list> #include <vdr/plugin.h> -#if APIVERSNUM < 10507 -#include "i18n.h" -#define trNOOP(s) (s) -#endif #include "services.h" #include "mainmenushortcut.h" @@ -36,104 +32,6 @@ static const char DESCRIPTION[] = trNOOP("Direct access to epgsearch's conflic static const char MAINMENUENTRY[] = trNOOP("Timer conflicts"); static const char SETUPTEXT[] = trNOOP("Conflict info in main menu"); -#if APIVERSNUM < 10507 -const tI18nPhrase PhrasesLocal[] = { - { - "Direct access to epgsearch's conflict check menu", - "Direkter Zugriff auf epgsearch's Konflikt-Prüfungs-Menü", // Deutsch - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "Suoratoiminto EPGSearch-laajennoksen ajastimien tarkistukselle", - "", // TODO Polski - "Acceso directo al menú de conflictos EPGSearch", // Español - "", // TODO ÅëëçíéêÜ (Greek) - "", // TODO Svenska - "", // TODO Romaneste - "", // TODO Magyar - "", // TODO Català - "", // TODO ÀãááÚØÙ (Russian) - "", // TODO Hrvatski (Croatian) - "", // Eesti - "", // Dansk - "", // Czech - }, - { - "Timer conflicts", - "Timer-Konflikte", - "", // TODO - "", // TODO - "", - "", // TODO - "", - "", // TODO - "Ajastimien päällekkäisyydet", - "", // TODO - "Conflictos de programación", - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "", // Eesti - "", // Dansk - "", // Czech - }, - { - "next", - "nächster", - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "seuraava", - "", // TODO - "siguiente", - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "", // Eesti - "", // Dansk - "", // Czech - }, - { - "Conflict info in main menu", - "Konflikt-Info im Hauptmenü", - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "Näytä päällekkäisyydet päävalikossa", - "", // TODO - "Mostrar conflictos en menú principal", - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "", // Eesti - "", // Dansk - "", // Czech - }, - {NULL} -}; -#endif - cString DateTime(time_t t) { char buffer[32]; @@ -157,30 +55,18 @@ public: virtual const char *Version() { return VERSION; } -#if APIVERSNUM < 10507 - virtual const char *Description() { - return tr(DESCRIPTION); - } -#else virtual const char *Description() { return I18nTranslate(DESCRIPTION, I18nEpgsearch); } -#endif virtual bool Initialize(); virtual cOsdObject *MainMenuAction() { return GetEpgSearchMenu("Epgsearch-conflictmenu-v1.0"); } protected: -#if APIVERSNUM < 10507 - virtual const char *SetupText() { - return tr(SETUPTEXT); - } -#else virtual const char *SetupText() { return I18nTranslate(SETUPTEXT, I18nEpgsearch); } -#endif virtual const char *MainMenuText(void); }; @@ -195,11 +81,7 @@ cPluginConflictcheckonly::~cPluginConflictcheckonly() const char *cPluginConflictcheckonly::MainMenuText(void) { -#if APIVERSNUM < 10507 - const char *menuText = tr(MAINMENUENTRY); -#else const char *menuText = I18nTranslate(MAINMENUENTRY, I18nEpgsearch); -#endif cPlugin *epgSearchPlugin = cPluginManager::GetPlugin("epgsearch"); if (epgSearchPlugin) { @@ -208,11 +90,7 @@ const char *cPluginConflictcheckonly::MainMenuText(void) if (serviceData->relevantConflicts > 0) { free(_menuText); if (asprintf(&_menuText, "%s (%d, %s: %s)", menuText, serviceData->relevantConflicts, -#if APIVERSNUM < 10507 - tr("next"), *DateTime(serviceData->nextConflict))) -#else I18nTranslate("next", I18nEpgsearch), *DateTime(serviceData->nextConflict))) -#endif menuText = _menuText; } } @@ -223,9 +101,6 @@ const char *cPluginConflictcheckonly::MainMenuText(void) bool cPluginConflictcheckonly::Initialize(void) { -#if APIVERSNUM < 10507 - RegisterI18n(PhrasesLocal); -#endif return cMainMenuShortcut::Initialize(); } diff --git a/epgsearch.c b/epgsearch.c index f6bcf97..8e809b2 100644 --- a/epgsearch.c +++ b/epgsearch.c @@ -37,7 +37,6 @@ The project's page is at http://winni.vdr-developer.org/epgsearch #include "menu_event.h" #include "menu_main.h" #include "menu_whatson.h" -#include "i18n.h" #include "epgsearchsetup.h" #include "epgsearchcfg.h" #include "epgsearchext.h" @@ -423,9 +422,6 @@ bool cPluginEpgsearch::Service(const char *Id, void *Data) bool cPluginEpgsearch::Initialize(void) { -#if APIVERSNUM < 10507 - RegisterI18n(Phrases); -#endif return true; } diff --git a/epgsearchonly.c b/epgsearchonly.c index a56d513..7b5b24d 100644 --- a/epgsearchonly.c +++ b/epgsearchonly.c @@ -24,10 +24,6 @@ The project's page is at http://winni.vdr-developer.org/epgsearch #include <string> #include <list> #include <vdr/plugin.h> -#if APIVERSNUM < 10507 -#include <vdr/i18n.h> -#define trNOOP(s) (s) -#endif #include "services.h" #include "mainmenushortcut.h" @@ -36,123 +32,30 @@ static const char *DESCRIPTION = trNOOP("Direct access to epgsearch's search m static const char *MAINMENUENTRY = trNOOP("Search"); static const char *SETUPTEXT = trNOOP("EpgSearch-Search in main menu"); -#if APIVERSNUM < 10507 -const tI18nPhrase PhrasesLocal[] = { - { - "Direct access to epgsearch's search menu", - "Direkter Zugriff auf epgsearch's Suchenmenu", // Deutsch - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "Suoratoiminto EPGSearch-laajennoksen haulle", - "", // TODO Polski - "Acceso directo al menú de búsquedas en EPG", // Español - "", // TODO ÅëëçíéêÜ (Greek) - "", // TODO Svenska - "", // TODO Romaneste - "", // TODO Magyar - "", // TODO Català - "", // TODO ÀãááÚØÙ (Russian) - "", // TODO Hrvatski (Croatian) - "", // Eesti - "", // Dansk - "", // Czech - }, - { - "Search", - "Suche", - "", // TODO - "Ricerca", - "Zoek", - "", // TODO - "Recherche", - "", // TODO - "Etsi ohjelmaoppaasta", - "", // TODO - "Búsquedas en EPG", - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "", // Eesti - "", // Dansk - "", // Czech - }, - { - "EpgSearch-Search in main menu", - "EpgSearch-Suche im Hauptmenü", // Deutsch - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "EpgSearch-laajennoksen hakutoiminto päävalikossa", - "", // TODO Polski - "Búsquedas en EPG en menú principal", - "", // TODO ÅëëçíéêÜ (Greek) - "", // TODO Svenska - "", // TODO Romaneste - "", // TODO Magyar - "", // TODO Català - "", // TODO ÀãááÚØÙ (Russian) - "", // TODO Hrvatski (Croatian) - "", // Eesti - "", // Dansk - "", // Czech - }, - {NULL} -}; -#endif - class cPluginEpgsearchonly:public cMainMenuShortcut { public: virtual const char *Version() { return VERSION; } -#if APIVERSNUM < 10507 - virtual const char *Description() { - return tr(DESCRIPTION); - } -#else virtual const char *Description() { return I18nTranslate(DESCRIPTION, I18nEpgsearch); } -#endif virtual bool Initialize(); virtual cOsdObject *MainMenuAction() { return GetEpgSearchMenu("Epgsearch-searchmenu-v1.0"); }; protected: -#if APIVERSNUM < 10507 - virtual const char *SetupText() { - return tr(SETUPTEXT); - } - virtual const char *MainMenuText() { - return tr(MAINMENUENTRY); - }; -#else virtual const char *SetupText() { return I18nTranslate(SETUPTEXT, I18nEpgsearch); } virtual const char *MainMenuText() { return I18nTranslate(MAINMENUENTRY, I18nEpgsearch); } -#endif }; bool cPluginEpgsearchonly::Initialize() { -#if APIVERSNUM < 10507 - RegisterI18n(PhrasesLocal); -#endif return cMainMenuShortcut::Initialize(); } diff --git a/epgsearchtools.c b/epgsearchtools.c index b403656..3bc4932 100644 --- a/epgsearchtools.c +++ b/epgsearchtools.c @@ -40,7 +40,6 @@ The project's page is at http://winni.vdr-developer.org/epgsearch #include "distance.h" #include "md5.h" #include "afuzzy.h" -#include "i18n.h" #include "timerstatus.h" #if APIVERSNUM >= 10503 #include <langinfo.h> diff --git a/epgsearchtools.h b/epgsearchtools.h index 9f3b48b..dd8899c 100644 --- a/epgsearchtools.h +++ b/epgsearchtools.h @@ -29,7 +29,6 @@ The project's page is at http://winni.vdr-developer.org/epgsearch #include <vdr/font.h> #include "epgsearchext.h" #include "recdone.h" -#include "i18n.h" using std::string; diff --git a/i18n-template.h b/i18n-template.h deleted file mode 100644 index 7d18093..0000000 --- a/i18n-template.h +++ /dev/null @@ -1,38 +0,0 @@ -/* -Copyright (C) 2004-2011 Christian Wieninger - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -Or, point your browser to http://www.gnu.org/licenses/old-licenses/gpl-2.0.html - -The author can be reached at cwieninger@gmx.de - -The project's page is at http://winni.vdr-developer.org/epgsearch -*/ - -/* - WARNING: automatically generated content. Changes will get lost! - - If this file is 'i18n-generated.h' then it *really* is automatically - generated. - If this file is 'i18n-template.h' then it is the base for the - autogeneration of the other file. - -*/ - -const tI18nPhrase Phrases[] = { -// START I18N -// END I18N - { NULL } -}; @@ -1,32 +0,0 @@ -/* -Copyright (C) 2004-2011 Christian Wieninger - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -Or, point your browser to http://www.gnu.org/licenses/old-licenses/gpl-2.0.html - -The author can be reached at cwieninger@gmx.de - -The project's page is at http://winni.vdr-developer.org/epgsearch -*/ - -#include <vdr/plugin.h> - -#if APIVERSNUM < 10507 - -#include "i18n.h" -#include "epgsearchtools.h" -#include "i18n-generated.h" - -#endif @@ -1,39 +0,0 @@ -/* -Copyright (C) 2004-2011 Christian Wieninger - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -Or, point your browser to http://www.gnu.org/licenses/old-licenses/gpl-2.0.html - -The author can be reached at cwieninger@gmx.de - -The project's page is at http://winni.vdr-developer.org/epgsearch -*/ - - -#ifndef _I18N__H -#define _I18N__H - -#include <vdr/i18n.h> - -#if APIVERSNUM < 10507 -extern const tI18nPhrase Phrases[]; -#define trNOOP(s) (s) -#endif - -#if APIVERSNUM < 10509 -#define trVDR(s) tr(s) -#endif - -#endif //_I18N__H diff --git a/mainmenushortcut.c b/mainmenushortcut.c index b2d293e..fa8bbce 100644 --- a/mainmenushortcut.c +++ b/mainmenushortcut.c @@ -26,64 +26,11 @@ The project's page is at http://winni.vdr-developer.org/epgsearch #include <memory> #include <set> #include <vdr/plugin.h> -#include "i18n.h" #include "services.h" #include "mainmenushortcut.h" static const char SETUPENTRY[] = "MainMenuEntryEnabled"; -#if APIVERSNUM < 10507 -const tI18nPhrase Phrases[] = { - { - "This version of EPGSearch does not support this service!", - "Diese Version von EPGSearch unterstützt diesen Dienst nicht!", - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "EPGSearch-laajennos ei tarjoa vaadittavaa palvelua!", - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "", // Eesti - "", // Dansk - "", // Czech - }, - { - "EPGSearch does not exist!", - "EPGSearch nicht vorhanden!", - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "EPGSearch-laajennosta ei löydy!", - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "", // TODO - "", // Eesti - "", // Dansk - "", // Czech - }, - {NULL} -}; -#endif - cMainMenuShortcutSetupPage::cMainMenuShortcutSetupPage(const char *setupText, const char *setupEntry, int *const setupValue) @@ -104,9 +51,6 @@ cMainMenuShortcut::cMainMenuShortcut() cMainMenuShortcut::~cMainMenuShortcut() { -#if APIVERSNUM < 10507 - I18nRegister(NULL, PLUGIN_NAME_I18N); -#endif } cOsdMenu *cMainMenuShortcut::GetEpgSearchMenu(const char *serviceName) @@ -131,9 +75,6 @@ cOsdMenu *cMainMenuShortcut::GetEpgSearchMenu(const char *serviceName) bool cMainMenuShortcut::Initialize() { -#if APIVERSNUM < 10507 - I18nRegister(Phrases, PLUGIN_NAME_I18N); -#endif return true; } diff --git a/quickepgsearch.c b/quickepgsearch.c index aedfdd6..3980d5b 100644 --- a/quickepgsearch.c +++ b/quickepgsearch.c @@ -24,7 +24,6 @@ The project's page is at http://winni.vdr-developer.org/epgsearch #include <string> #include <list> #include <vdr/plugin.h> -#include "i18n.h" #include "services.h" #include "mainmenushortcut.h" @@ -33,109 +32,21 @@ static const char DESCRIPTION[] = trNOOP("Quick search for broadcasts"); static const char MAINMENUENTRY[] = trNOOP("Quick search"); static const char SETUPTEXT[] = trNOOP("Show in main menu"); -#if APIVERSNUM < 10507 -const tI18nPhrase PhrasesLocal[] = -{ - { - "Quick search for broadcasts", - "Schnelle Suche nach Sendungen",// Deutsch - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "Pikahaku ohjelmaoppaalle",// suomi - "",// TODO Polski - "Búsqueda rápida de emisiones",// Español - "",// TODO ÅëëçíéêÜ (Greek) - "",// TODO Svenska - "",// TODO Romaneste - "",// TODO Magyar - "",// TODO Català - "",// TODO ÀãááÚØÙ (Russian) - "",// TODO Hrvatski (Croatian) - "", // Eesti - "", // Dansk - "", // Czech - }, - { - "Quick search", - "Schnellsuche", - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "Pikahaku", - "",// TODO - "Búsqueda rápida", - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "", // Eesti - "", // Dansk - "", // Czech - }, - { - "Show in main menu", - "Im Hauptmenü anzeigen", - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "Näytä valinta päävalikossa", - "",// TODO - "Mostrar en menú principal", - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "", // Eesti - "", // Dansk - "", // Czech - }, - { NULL } -}; -#endif - class cPluginQuicksearch : public cMainMenuShortcut { public: virtual const char* Version() { return VERSION; } -#if APIVERSNUM < 10507 - virtual const char* Description() { return tr(DESCRIPTION); } -#else virtual const char* Description() { return I18nTranslate(DESCRIPTION, I18nEpgsearch); } -#endif virtual bool Initialize(); virtual cOsdObject* MainMenuAction() { return GetEpgSearchMenu("Epgsearch-quicksearch-v1.0"); }; protected: -#if APIVERSNUM < 10507 - virtual const char* SetupText() { return tr(SETUPTEXT); } - virtual const char* MainMenuText() { return tr(MAINMENUENTRY); }; -#else virtual const char* SetupText() { return I18nTranslate(SETUPTEXT, I18nEpgsearch); } virtual const char* MainMenuText() { return I18nTranslate(MAINMENUENTRY, I18nEpgsearch); } -#endif }; bool cPluginQuicksearch::Initialize() { -#if APIVERSNUM < 10507 - RegisterI18n(PhrasesLocal); -#endif return cMainMenuShortcut::Initialize(); } |