Hi,
Do you think this the way to go ? (patch attached) :

This uses a make target to update your po/$LG.po translation file 
with all new strings freshly extracted from the actual source code. 
This won't overwrite already translated strings in the po file.
So translators don't have to wonder how to do it anymore, and may 
work with latest strings from svn HEAD. Just 

  svn up
  make uptrans LG=de     # or es, it, ...

And edit you po/de.po file.

Also, obsoletes any need for the confusing and sometimes out of 
date powertop.pot file in svn, please remove it.


Index: Makefile
===================================================================
--- Makefile    (révision 105)
+++ Makefile    (copie de travail)
@@ -18,12 +18,14 @@
        mkdir -p ${DESTDIR}${MANDIR}
        cp powertop.1.gz ${DESTDIR}${MANDIR}
        @(cd po/ && env LOCALESDIR=$(LOCALESDIR) DESTDIR=$(DESTDIR) $(MAKE) $@)
-       
-retranslate:
-       xgettext -C -s -k_ -o powertop.pot *.c *.h
-               
 
+# This is for translators. To update your po with new strings, do :
+# svn up ; make uptrans LG=fr # or de, ru, hu, it, ...
+uptrans:
+       xgettext -C -s -k_ -o po/powertop.pot *.c *.h
+       @(cd po/ && env LG=$(LG) $(MAKE) $@)
+
 clean:
-       rm -f *~ powertop powertop.1.gz
+       rm -f *~ powertop powertop.1.gz po/powertop.pot
        @(cd po/ && $(MAKE) $@)
 
Index: po/Makefile
===================================================================
--- po/Makefile (révision 105)
+++ po/Makefile (copie de travail)
@@ -18,3 +18,13 @@
        mkdir -p $(DESTDIR)$(LOCALESDIR)/$*/LC_MESSAGES/
        -cp -f $< $(DESTDIR)$(LOCALESDIR)/$*/LC_MESSAGES/powertop.mo
 
+uptrans: $(LG).po
+
+$(LG).po: powertop.pot
+ifdef LG
+       msgmerge -U $@ $<
+else
+       @echo "Usage : make uptrans LG=xx # with xx = de, es, fi ..."
+       @exit 1
+endif
+
_______________________________________________
Power mailing list
[email protected]
http://www.bughost.org/mailman/listinfo/power

Reply via email to