Gentoo Archives: gentoo-commits

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