summaryrefslogtreecommitdiff
blob: 1c26abb155343785ce0b56842048aa0044c22fe5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
https://bugs.gentoo.org/show_bug.cgi?id=424269
several fixes
missing xgettext handling
Signed-of-by: Joerg Bornkessel <hd_brummy@gentoo.org> ( 2012/11/02 )
diff -Naur clock-1.0.0.old/clock.c clock-1.0.0/clock.c
--- clock-1.0.0.old/clock.c	2008-03-07 16:54:27.000000000 +0100
+++ clock-1.0.0/clock.c	2012-10-30 12:21:59.473174499 +0100
@@ -26,15 +26,15 @@
 #include <vdr/remote.h>
 #include <math.h>
 #include "enhancedbitmap.h"
-#include "i18n.h"
+#include <vdr/i18n.h>
 
 #include "images/clock.xpm"
 #include "images/tux.xpm"
 #include "images/tuxpart.xpm"
 
 static const char *VERSION        = "1.0.0";
-static const char *DESCRIPTION    = "A Simple Clock";
-static const char *MAINMENUENTRY  = "Clock";
+static const char *DESCRIPTION    = trNOOP("A Simple Clock");
+static const char *MAINMENUENTRY  = trNOOP("Clock");
 
 // Global variables
 
@@ -67,21 +67,21 @@
 int       ColorMin   = 1;
 int       ColorSec   = 3;
 int       TeaTime    = 5;
-const char      *TimeColors[]  = {"Transparent",
-                            "White",
-	                    "Black",
-			    "Red",
-			    "Green",
-			    "Yellow",
-			    "Blue",
+const char      *TimeColors[]  = {trNOOP("Transparent"),
+                            trNOOP("White"),
+	                    trNOOP("Black"),
+			    trNOOP("Red"),
+			    trNOOP("Green"),
+			    trNOOP("Yellow"),
+			    trNOOP("Blue"),
                            };
-const char      *ClockType[] = {"Digital",
-			  "Analog",
-			  "Analog modern",
-			  "MorphOS",
-			  "TuxClock",
-			  "Internet time",
-			  "Tea clock",
+const char      *ClockType[] = {trNOOP("Digital"),
+			  trNOOP("Analog"),
+			  trNOOP("Analog modern"),
+			  trNOOP("MorphOS"),
+			  trNOOP("TuxClock"),
+			  trNOOP("Internet time"),
+			  trNOOP("Tea clock"),
                          };
 
 
@@ -590,13 +590,13 @@
   cPluginClock(void);
   virtual ~cPluginClock();
   virtual const char *Version(void) { return VERSION; }
-  virtual const char *Description(void) { return DESCRIPTION; }
+  virtual const char *Description(void) { return tr(DESCRIPTION); }
   virtual const char *CommandLineHelp(void);
   virtual bool ProcessArgs(int argc, char *argv[]);
   virtual bool Initialize(void);
   virtual bool Start(void);
   virtual void Housekeeping(void);
-  virtual const char *MainMenuEntry(void) { return MAINMENUENTRY; }
+  virtual const char *MainMenuEntry(void) { return tr(MAINMENUENTRY); }
   virtual cOsdObject *MainMenuAction(void);
   virtual cMenuSetupPage *SetupMenu(void);
   virtual bool SetupParse(const char *Name, const char *Value);
@@ -635,7 +635,6 @@
 bool cPluginClock::Start(void)
 {
   // Start any background activities the plugin shall perform.
-  RegisterI18n(Phrases);
   return true;
 }
 
diff -Naur clock-1.0.0.old/Makefile clock-1.0.0/Makefile
--- clock-1.0.0.old/Makefile	2008-01-22 10:25:15.000000000 +0100
+++ clock-1.0.0/Makefile	2012-10-30 12:22:19.274187084 +0100
@@ -48,7 +48,7 @@
 
 ### The object files (add further files here):
 
-OBJS = $(PLUGIN).o i18n.o enhancedbitmap.o
+OBJS = $(PLUGIN).o enhancedbitmap.o
 
 ### Implicit rules:
 
@@ -64,9 +64,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 *.c)
+	xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP --msgid-bugs-address='<dev@erichseifert.de>' -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 $@
@@ -81,4 +106,5 @@
 	@echo Distribution package created as $(PACKAGE).tgz
 
 clean:
+	@-rm -f $(PODIR)/*.mo $(PODIR)/*.pot
 	@-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~
diff -Naur clock-1.0.0.old/po/de_DE.po clock-1.0.0/po/de_DE.po
--- clock-1.0.0.old/po/de_DE.po	1970-01-01 01:00:00.000000000 +0100
+++ clock-1.0.0/po/de_DE.po	2012-10-30 13:32:46.391048407 +0100
@@ -0,0 +1,123 @@
+# VDR plugin language source file.
+# Copyright (C) 2007 Klaus Schmidinger <kls@tvdr.de>
+# This file is distributed under the same license as the VDR package.
+# Klaus Schmidinger <kls@tvdr.de>, 2000
+# Erich Seifert <dev@erichseifert.de>, 2012
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: VDR 1.7.27\n"
+"Report-Msgid-Bugs-To: <dev@erichseifert.de>\n"
+"POT-Creation-Date: 2012-10-30 13:00+0200\n"
+"PO-Revision-Date: 2012-10-30 13:35+0200\n"
+"Last-Translator: Erich Seifert <dev@erichseifert.de>\n"
+"Language-Team: <vdr@linuxtv.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-15\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "A Simple Clock"
+msgstr "Eine einfache Uhr"
+
+msgid "Clock"
+msgstr "Uhr"
+
+msgid "Transparent"
+msgstr "Transparent"
+
+msgid "White"
+msgstr "Wei�"
+
+msgid "Black"
+msgstr "Schwarz"
+
+msgid "Red"
+msgstr "Rot"
+
+msgid "Green"
+msgstr "Gr�n"
+
+msgid "Yellow"
+msgstr "Gelb"
+
+msgid "Blue"
+msgstr "Blau"
+
+msgid "Digital"
+msgstr "Digital"
+
+msgid "Analog"
+msgstr "Analog"
+
+msgid "Analog modern"
+msgstr ""
+
+msgid "MorphOS"
+msgstr ""
+
+msgid "TuxClock"
+msgstr ""
+
+msgid "Internet time"
+msgstr "Internet-Zeit"
+
+msgid "Tea clock"
+msgstr "Teekocher"
+
+msgid "It's tea time"
+msgstr "Es ist Teezeit!"
+
+msgid "x Position"
+msgstr "x-Position"
+
+msgid "y Position"
+msgstr "y-Position"
+
+msgid "Type of the clock"
+msgstr "Art der Uhr"
+
+msgid "Background color"
+msgstr "Hintergrundfarbe"
+
+msgid "Foreground color"
+msgstr "Vordergrundfarbe"
+
+msgid "Show Seconds"
+msgstr "Sekunden anzeigen"
+
+msgid "FullScreen"
+msgstr "FullScreen"
+
+msgid "Analog clock size"
+msgstr "Gr��e der analogen Uhr"
+
+msgid "Arrow color"
+msgstr "Zeigerfarbe"
+
+msgid "Length of hour arrow [%]"
+msgstr "L�nge des Stundenzeigers [%]"
+
+msgid "Width of hour arrow [%]"
+msgstr "Breite des Stundenzeigers [%]"
+
+msgid "Length of min arrow [%]"
+msgstr "L�nge des Minutenzeigers [%]"
+
+msgid "Width of min arrow [%]"
+msgstr "Breite des Minutenzeigers [%]"
+
+msgid "Seconds arrow color"
+msgstr "Farbe des Sekundenzeigers"
+
+msgid "Length of sec arrow [%]"
+msgstr "L�nge des Sekundenzeigers [%]"
+
+msgid "Width of sec arrow [%]"
+msgstr "Breite des Sekundenzeigers [%]"
+
+msgid "Time till tea"
+msgstr "Zeit bis der Tee fertig ist"
+
+msgid "Show Countdown"
+msgstr "Countdown anzeigen"
diff -Naur clock-1.0.0.old/po/fr_FR.po clock-1.0.0/po/fr_FR.po
--- clock-1.0.0.old/po/fr_FR.po	1970-01-01 01:00:00.000000000 +0100
+++ clock-1.0.0/po/fr_FR.po	2012-10-30 12:36:16.925722659 +0100
@@ -0,0 +1,125 @@
+# VDR plugin language source file.
+# Copyright (C) 2007 Klaus Schmidinger <kls@tvdr.de>
+# This file is distributed under the same license as the VDR package.
+# Jean-Claude Repetto <jc@repetto.org>, 2001
+# Olivier Jacques <jacquesolivier@hotmail.com>, 2003
+# Gregoire Favre <greg@magma.unil.ch>, 2003
+# Nicolas Huillard <nhuillard@e-dition.fr>, 2005
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: VDR 1.7.27\n"
+"Report-Msgid-Bugs-To: <dev@erichseifert.de>\n"
+"POT-Creation-Date: 2012-10-30 13:00+0200\n"
+"PO-Revision-Date: 2012-10-30 13:00+0200\n"
+"Last-Translator: Nicolas Huillard <nhuillard@e-dition.fr>\n"
+"Language-Team: <vdr@linuxtv.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "A Simple Clock"
+msgstr ""
+
+msgid "Clock"
+msgstr "Heure"
+
+msgid "Transparent"
+msgstr "Transparent"
+
+msgid "White"
+msgstr "Blanc"
+
+msgid "Black"
+msgstr "Noir"
+
+msgid "Red"
+msgstr "Rouge"
+
+msgid "Green"
+msgstr "Vert"
+
+msgid "Yellow"
+msgstr "Jaune"
+
+msgid "Blue"
+msgstr "Bleu"
+
+msgid "Digital"
+msgstr "Digital"
+
+msgid "Analog"
+msgstr "Analogique"
+
+msgid "Analog modern"
+msgstr ""
+
+msgid "MorphOS"
+msgstr ""
+
+msgid "TuxClock"
+msgstr ""
+
+msgid "Internet time"
+msgstr "Temps internet"
+
+msgid "Tea clock"
+msgstr "Pause cafe"
+
+msgid "It's tea time"
+msgstr "c'est l'heure de la pause cafe"
+
+msgid "x Position"
+msgstr "x Position"
+
+msgid "y Position"
+msgstr "y Position"
+
+msgid "Type of the clock"
+msgstr "Format d'affichage"
+
+msgid "Background color"
+msgstr "Couleur de fond"
+
+msgid "Foreground color"
+msgstr "Couleur premier plan"
+
+msgid "Show Seconds"
+msgstr "Afficher secondes"
+
+msgid "FullScreen"
+msgstr "FullScreen"
+
+msgid "Analog clock size"
+msgstr "Taille de l'horloge analogique"
+
+msgid "Arrow color"
+msgstr "Couleur aiguilles"
+
+msgid "Length of hour arrow [%]"
+msgstr "Longueur aiguille Hr [%]"
+
+msgid "Width of hour arrow [%]"
+msgstr "Largeur des aiguilles Hr [%]"
+
+msgid "Length of min arrow [%]"
+msgstr "Longueur aiguille Min [%]"
+
+msgid "Width of min arrow [%]"
+msgstr "Largeur des aiguilles Min [%]"
+
+msgid "Seconds arrow color"
+msgstr "Couleur aiguille Sec"
+
+msgid "Length of sec arrow [%]"
+msgstr "Longueur aiguille Sec [%]"
+
+msgid "Width of sec arrow [%]"
+msgstr "Largeur des aiguilles Sec [%]"
+
+msgid "Time till tea"
+msgstr "Temps restant jusqu'au cafe"
+
+msgid "Show Countdown"
+msgstr "Afficher le compte a rebours"
diff -Naur clock-1.0.0.old/po/it_IT.po clock-1.0.0/po/it_IT.po
--- clock-1.0.0.old/po/it_IT.po	1970-01-01 01:00:00.000000000 +0100
+++ clock-1.0.0/po/it_IT.po	2012-10-30 12:36:16.926722660 +0100
@@ -0,0 +1,124 @@
+# VDR plugin language source file.
+# Copyright (C) 2007 Klaus Schmidinger <kls@tvdr.de>
+# This file is distributed under the same license as the VDR package.
+# Alberto Carraro <bertocar@tin.it>, 2001
+# Antonio Ospite <ospite@studenti.unina.it>, 2003
+# Sean Carlos <seanc@libero.it>, 2005
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: VDR 1.7.27\n"
+"Report-Msgid-Bugs-To: <dev@erichseifert.de>\n"
+"POT-Creation-Date: 2012-10-30 13:00+0200\n"
+"PO-Revision-Date: 2012-10-30 13:00+0200\n"
+"Last-Translator: Sean Carlos <seanc@libero.it>\n"
+"Language-Team: <vdr@linuxtv.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-15\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "A Simple Clock"
+msgstr ""
+
+msgid "Clock"
+msgstr "Orologio"
+
+msgid "Transparent"
+msgstr "Trasparente"
+
+msgid "White"
+msgstr "Bianco"
+
+msgid "Black"
+msgstr "Nero"
+
+msgid "Red"
+msgstr "Rosso"
+
+msgid "Green"
+msgstr "Verde"
+
+msgid "Yellow"
+msgstr "Giallo"
+
+msgid "Blue"
+msgstr "Blu"
+
+msgid "Digital"
+msgstr "Digitale"
+
+msgid "Analog"
+msgstr "Analogico"
+
+msgid "Analog modern"
+msgstr ""
+
+msgid "MorphOS"
+msgstr ""
+
+msgid "TuxClock"
+msgstr ""
+
+msgid "Internet time"
+msgstr "Ora Internet"
+
+msgid "Tea clock"
+msgstr "Pausa t�"
+
+msgid "It's tea time"
+msgstr "E' l'ora del t�!"
+
+msgid "x Position"
+msgstr "Posizione x"
+
+msgid "y Position"
+msgstr "Posizione y"
+
+msgid "Type of the clock"
+msgstr "Tipo di orologio"
+
+msgid "Background color"
+msgstr "Colore sfondo"
+
+msgid "Foreground color"
+msgstr "Colore primo piano"
+
+msgid "Show Seconds"
+msgstr "Mostra secondi"
+
+msgid "FullScreen"
+msgstr "Schermo intero"
+
+msgid "Analog clock size"
+msgstr "Dimensione orologio analogico"
+
+msgid "Arrow color"
+msgstr "Colore freccia"
+
+msgid "Length of hour arrow [%]"
+msgstr "Lunghezza freccia ore [%]"
+
+msgid "Width of hour arrow [%]"
+msgstr "Larghezza freccia ore [%]"
+
+msgid "Length of min arrow [%]"
+msgstr "Lunghezza freccia minuti [%]"
+
+msgid "Width of min arrow [%]"
+msgstr "Larghezza freccia minuti [%]"
+
+msgid "Seconds arrow color"
+msgstr "Colore freccia secondi"
+
+msgid "Length of sec arrow [%]"
+msgstr "Lunghezza freccia secondi [%]"
+
+msgid "Width of sec arrow [%]"
+msgstr "Larghezza freccia secondi [%]"
+
+msgid "Time till tea"
+msgstr "Tempo restante per il t�"
+
+msgid "Show Countdown"
+msgstr "Mostra conto alla rovescia"