Pauli Virtanen <[EMAIL PROTECTED]> writes:

| Hi,
| 
| There currently are some problems with localization in LyX 1.3.0cvs (as
| of Dec 3), which might need some fixing.
| 
| 
| The first three concern extraction of strings from (autogenerated)
| sources to lyx.pot:
| 
| 1.  Translatable strings from xforms dialogs are not extracted to
| lyx.pot.

This patch fixes that problem:

Index: Makefile.in.in
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/po/Makefile.in.in,v
retrieving revision 1.20
diff -u -p -r1.20 Makefile.in.in
--- Makefile.in.in      16 Apr 2002 21:59:01 -0000      1.20
+++ Makefile.in.in      8 Dec 2002 19:29:09 -0000
@@ -86,7 +86,7 @@ all-no:
 # otherwise packages like GCC can not be built if only parts of the source
 # have been downloaded.

-$(srcdir)/$(PACKAGE).pot: $(POTFILES) $(srcdir)/POTFILES.in $(top_srcdir)/src/e
xt_l10n.h
+$(srcdir)/$(PACKAGE).pot: $(POTFILES) $(srcdir)/POTFILES.in $(top_srcdir)/src/e
xt_l10n.h $(top_srcdir)/src/frontends/xforms/xforms_l10n.h
        $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
          --escape --add-comments --keyword=_ --keyword=N_ \
          --files-from=$(srcdir)/POTFILES.in \
@@ -202,7 +202,13 @@ ${srcdir}/POTFILES.in: $(POTFILE_IN_DEPS
             sed -e '/xforms.forms/d' | \
             sort -f -n | uniq ) > $@-t \
        && echo "src/ext_l10n.h" >> $@-t \
+       && echo "src/frontends/xforms/xforms_l10n.h" >> $@-t \
        && mv $@-t $@
+
+
+$(top_srcdir)/src/frontends/xforms/xforms_l10n.h: $(top_srcdir)/src/frontends/x
forms/forms/*.fd
+           awk ' /label: / { if (NF > 1) { line=$$2; sub(/label: /,"",line); pr
intf("// %s: %d\ngettext(\"%s\");\n\n", FILENAME, FNR, line); } }' `find $(top_s
rcdir)/src/frontends/xforms/forms -name \*.fd` > $@
+

 $(top_srcdir)/src/ext_l10n.h: $(top_srcdir)/lib/layouts/*.layout $(top_srcdir)/
lib/layouts/*.inc $(top_srcdir)/lib/ui/default.ui $(top_srcdir)/lib/languages
        sed < $(top_srcdir)/lib/ui/default.ui -n \


A better solution would probably be to manually generate a
lyx-xforms.pot file.

-- 
        Lgb

Reply via email to