This is a semi-automatically created i18n adaptation patch and may contain errors (such as missing translations). This should only be used as a temporary measure until the upstream plugin maintainer fixes the plugin properly according to the instructions in i18n-to-gettext.pl. Created for Mandriva Linux packaging by Anssi Hannula <anssi@mandriva.org>. Index: solitaire-0.0.2/Makefile =================================================================== --- solitaire-0.0.2/Makefile +++ solitaire-0.0.2/Makefile 2008-04-25 00:14:26.000000000 +0300 @@ -46,7 +46,7 @@ ### The object files (add further files here): -OBJS = $(PLUGIN).o cards.o game.o osd.o cursor.o i18n.o \ +OBJS = $(PLUGIN).o cards.o game.o osd.o cursor.o \ \ tools/collection.o tools/list.o tools/shared.o tools/string.o tools/tools.o @@ -71,9 +71,34 @@ -include $(DEPFILE) +### Internationalization (I18N): + +PODIR = po +LOCALEDIR = $(VDRDIR)/locale +I18Npo = $(wildcard $(PODIR)/*.po) +I18Nmsgs = $(addprefix $(LOCALEDIR)/, $(addsuffix /LC_MESSAGES/vdr-$(PLUGIN).mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file)))))) +I18Npot = $(PODIR)/$(PLUGIN).pot + +%.mo: %.po + msgfmt -c -o $@ $< + +$(I18Npot): $(wildcard *.[ch] *.[ch]xx *.cc *.[ch]pp *.hh) + xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP --msgid-bugs-address='<http://qa.mandriva.com/>' -o $@ $^ + +%.po: $(I18Npot) + msgmerge -U --no-wrap --no-location --backup=none -q $@ $< + @touch $@ + +$(I18Nmsgs): $(LOCALEDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo + @mkdir -p $(dir $@) + cp $< $@ + +.PHONY: i18n +i18n: $(I18Nmsgs) + ### Targets: -all: libvdr-$(PLUGIN).so +all: libvdr-$(PLUGIN).so i18n libvdr-$(PLUGIN).so: $(OBJS) $(CXX) $(CXXFLAGS) -shared $(OBJS) -o $@ @@ -88,6 +113,7 @@ @echo Distribution package created as $(PACKAGE).tgz clean: + @-rm -f $(PODIR)/*.mo $(PODIR)/*.pot @-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~ upd: Index: solitaire-0.0.2/game.c =================================================================== --- solitaire-0.0.2/game.c +++ solitaire-0.0.2/game.c 2008-04-25 00:15:02.000000000 +0300 @@ -4,7 +4,7 @@ #include "cards.h" #include "osd.h" #include "cursor.h" -#include "i18n.h" + #include <math.h> cSolitaireGame::cSolitaireGame(void): cOsdObject(true) { @@ -231,14 +231,14 @@ const cFont *font = cFont::GetFont(fontOsd); #endif /* VDRVERSNUM < 10307 */ static const char *HelpText = - "This is Solitaire, a card-game for the Video Disk Recorder.\n\n" + trNOOP("This is Solitaire, a card-game for the Video Disk Recorder.\n\n" "Up/Down: Jump cells/stacks\n" "Left/Right: Move hand/cards\n" "OK: Grab card or stack\n" "Up/Down: Select/Deselect cards\n" "OK: Confirm stack selection\n" "Blue: Start new game\n\n" - "Press OK to resume playing"; + "Press OK to resume playing"); int line = 0; char *text, *ptr, *first; Index: solitaire-0.0.2/i18n.c =================================================================== --- solitaire-0.0.2/i18n.c +++ solitaire-0.0.2/i18n.c 2008-04-25 00:14:26.000000000 +0300 @@ -1,148 +0,0 @@ -// originally from freecell by Sascha Volkenandt (sascha@akv-soft.de) - -#include "i18n.h" - -const tI18nPhrase Phrases[] = { - { "Solitaire", // English - "Solitaire", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "Pasianssi", // suomi - "", // Polski - "", // Español - "", // Ellinika / Greek - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Catala -#if VDRVERSNUM >= 10300 - "" // Russian -#endif - }, - { "The well-known card game",// English - "Das bekannte Kartenspiel",// Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "Korttipeliklassikko", // suomi - "", // Polski - "", // Español - "", // Ellinika / Greek - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Catala -#if VDRVERSNUM >= 10300 - "" // Russian -#endif - }, - { "You won!", // English - "Sie haben gewonnen!", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "Voitit!", // suomi - "", // Polski - "", // Español - "", // Ellinika / Greek - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Catala -#if VDRVERSNUM >= 10300 - "" // Russian -#endif - }, - { "Select stack", // English - "Stapel wählen", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "Valitse pino", // suomi - "", // Polski - "", // Español - "", // Ellinika - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Catala -#if VDRVERSNUM >= 10300 - "" // Russian -#endif - }, - { "Press OK to start a new game",// English - "OK beginnt ein neues Spiel",// Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "Käynnistä uusi peli painamalla 'OK'",// suomi - "", // Polski - "", // Español - "", // Ellinika - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Catala -#if VDRVERSNUM >= 10300 - "" // Russian -#endif - }, - { "This is Solitaire, a card-game for the Video Disk Recorder.\n\n" - "Up/Down: Jump cells/stacks\n" - "Left/Right: Move hand/cards\n" - "OK: Grab card or stack\n" - "Up/Down: Select/Deselect cards\n" - "OK: Confirm stack selection\n" - "Blue: Start new game\n\n" - "Press OK to resume playing", // English - "Dies ist Solitaire, ein Kartenspiel für den Video Disk Recorder.\n\n" - "Rauf/Runter: Zellen/Stapel springen\n" - "Links/Rechts: Hand/Stapel bewegen\n" - "OK: Karte oder Stapel nehmen\n" - "Rauf/Runter: Karten An-/Abwählen\n" - "OK: Stapelwahl bestätigen\n" - "Blau: Neues Spiel starten\n\n" - "OK drücken um fortzusetzen", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "Pasianssi - korttipeliklassikko VDR:lle.\n\n" - "'Ylös/Alas': Siirry kenttien/pinojen välillä\n" - "'Vasen/Oikea': Siirrä kursoria/korttia\n" - "'OK': Valitse kortti tai pino\n" - "'Ylös/Alas': Valitse kortti\n" - "'OK': Hyväksy pinon valinta\n" - "'Sininen': Käynnistä uusi peli\n\n" - "Paina 'OK' jatkaaksesi peliä", // suomi - "", // Polski - "", // Español - "", // Ellinika - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Catala -#if VDRVERSNUM >= 10300 - "" // Russian -#endif - }, - { NULL } -}; Index: solitaire-0.0.2/i18n.h =================================================================== --- solitaire-0.0.2/i18n.h +++ solitaire-0.0.2/i18n.h 2008-04-25 00:14:26.000000000 +0300 @@ -1,9 +0,0 @@ -#ifndef VDR_SOLITAIRE_I18N_H -#define VDR_SOLITAIRE_I18N_H - -#include <vdr/i18n.h> - -extern const tI18nPhrase Phrases[]; - -#endif // VDR_SOLITAIRE_I18N_H - Index: solitaire-0.0.2/solitaire.c =================================================================== --- solitaire-0.0.2/solitaire.c +++ solitaire-0.0.2/solitaire.c 2008-04-25 00:14:26.000000000 +0300 @@ -9,11 +9,11 @@ #include <vdr/plugin.h> #include "game.h" -#include "i18n.h" + static const char *VERSION = "0.0.2"; -static const char *DESCRIPTION = "The well-known card game"; -static const char *MAINMENUENTRY = "Solitaire"; +static const char *DESCRIPTION = trNOOP("The well-known card game"); +static const char *MAINMENUENTRY = trNOOP("Solitaire"); class cPluginSolitaire : public cPlugin { private: @@ -47,7 +47,7 @@ bool cPluginSolitaire::Start(void) { - RegisterI18n(Phrases); + return true; } Index: solitaire-0.0.2/po/de_DE.po =================================================================== --- solitaire-0.0.2/po/de_DE.po +++ solitaire-0.0.2/po/de_DE.po 2008-04-25 00:15:07.000000000 +0300 @@ -0,0 +1,51 @@ +# VDR solitaire plugin language source file. +# Copyright (C) YEAR THE VDR-solitaire'S COPYRIGHT HOLDER +# This file is distributed under the same license as the VDR-solitaire package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: VDR-solitaire\n" +"Report-Msgid-Bugs-To: <http://qa.mandriva.com/>\n" +"POT-Creation-Date: 2008-04-25 00:15+0300\n" +"PO-Revision-Date: 2008-04-25 00:14+0300\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: <vdr@linuxtv.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-15\n" +"Content-Transfer-Encoding: 8bit\n" + +msgid "" +"This is Solitaire, a card-game for the Video Disk Recorder.\n" +"\n" +"Up/Down: Jump cells/stacks\n" +"Left/Right: Move hand/cards\n" +"OK: Grab card or stack\n" +"Up/Down: Select/Deselect cards\n" +"OK: Confirm stack selection\n" +"Blue: Start new game\n" +"\n" +"Press OK to resume playing" +msgstr "Dies ist Solitaire, ein Kartenspiel für den Video Disk Recorder.\n\n" +"Rauf/Runter: Zellen/Stapel springen\n" +"Links/Rechts: Hand/Stapel bewegen\n" +"OK: Karte oder Stapel nehmen\n" +"Rauf/Runter: Karten An-/Abwählen\n" +"OK: Stapelwahl bestätigen\n" +"Blau: Neues Spiel starten\n\n" +"OK drücken um fortzusetzen" + +msgid "You won!" +msgstr "Sie haben gewonnen!" + +msgid "Press OK to start a new game" +msgstr "OK beginnt ein neues Spiel" + +msgid "Select stack" +msgstr "Stapel wählen" + +msgid "The well-known card game" +msgstr "Das bekannte Kartenspiel" + +msgid "Solitaire" +msgstr "Solitaire" Index: solitaire-0.0.2/po/fi_FI.po =================================================================== --- solitaire-0.0.2/po/fi_FI.po +++ solitaire-0.0.2/po/fi_FI.po 2008-04-25 00:15:07.000000000 +0300 @@ -0,0 +1,51 @@ +# VDR solitaire plugin language source file. +# Copyright (C) YEAR THE VDR-solitaire'S COPYRIGHT HOLDER +# This file is distributed under the same license as the VDR-solitaire package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: VDR-solitaire\n" +"Report-Msgid-Bugs-To: <http://qa.mandriva.com/>\n" +"POT-Creation-Date: 2008-04-25 00:15+0300\n" +"PO-Revision-Date: 2008-04-25 00:14+0300\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: <vdr@linuxtv.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-15\n" +"Content-Transfer-Encoding: 8bit\n" + +msgid "" +"This is Solitaire, a card-game for the Video Disk Recorder.\n" +"\n" +"Up/Down: Jump cells/stacks\n" +"Left/Right: Move hand/cards\n" +"OK: Grab card or stack\n" +"Up/Down: Select/Deselect cards\n" +"OK: Confirm stack selection\n" +"Blue: Start new game\n" +"\n" +"Press OK to resume playing" +msgstr "Pasianssi - korttipeliklassikko VDR:lle.\n\n" +"'Ylös/Alas': Siirry kenttien/pinojen välillä\n" +"'Vasen/Oikea': Siirrä kursoria/korttia\n" +"'OK': Valitse kortti tai pino\n" +"'Ylös/Alas': Valitse kortti\n" +"'OK': Hyväksy pinon valinta\n" +"'Sininen': Käynnistä uusi peli\n\n" +"Paina 'OK' jatkaaksesi peliä" + +msgid "You won!" +msgstr "Voitit!" + +msgid "Press OK to start a new game" +msgstr "Käynnistä uusi peli painamalla 'OK'" + +msgid "Select stack" +msgstr "Valitse pino" + +msgid "The well-known card game" +msgstr "Korttipeliklassikko" + +msgid "Solitaire" +msgstr "Pasianssi" Index: solitaire-0.0.2/po/solitaire.pot =================================================================== --- solitaire-0.0.2/po/solitaire.pot +++ solitaire-0.0.2/po/solitaire.pot 2008-04-25 00:15:07.000000000 +0300 @@ -0,0 +1,45 @@ +# 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: <http://qa.mandriva.com/>\n" +"POT-Creation-Date: 2008-04-25 00:15+0300\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" + +msgid "" +"This is Solitaire, a card-game for the Video Disk Recorder.\n" +"\n" +"Up/Down: Jump cells/stacks\n" +"Left/Right: Move hand/cards\n" +"OK: Grab card or stack\n" +"Up/Down: Select/Deselect cards\n" +"OK: Confirm stack selection\n" +"Blue: Start new game\n" +"\n" +"Press OK to resume playing" +msgstr "" + +msgid "You won!" +msgstr "" + +msgid "Press OK to start a new game" +msgstr "" + +msgid "Select stack" +msgstr "" + +msgid "The well-known card game" +msgstr "" + +msgid "Solitaire" +msgstr ""