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.

The cause is that src/frontends/xforms/forms/*.C are not added to
po/POTFILES.in by po/Makefile.in.in. (In 1.2.x these files were added)

The attached 'forms-potfiles.patch' is a dirty hack to solve this: it
makes sure the source files are autogenerated first, and then adds them
to POTFILES.in.

2.  At least with Qt 3.0.5, uic puts trUtf8() instead of tr() in the
source files it generates, which the sed script in
src/frontends/qt2/ui/Makefile.am does not replace with _() as it should.
This causes the translations of dialogs to not appear when running
(although translatable strings are properly extracted to lyx.pot). The
attached 'qt3-trUtf8-replace.patch' fixes this, but perhaps using the
-tr switch of uic would be a cleaner solution (if it works with uic from
qt2).

3.  Currently strings like "<page>" are extracted as-is from the
qt ui files, but appear like "<page>" in the source, which makes them
effectively untranslatable. Ampersand entities &amp; are handled
explicitly in po/Makefile.in, but other entities are not, which causes
the problem.


The rest have to do with some untranslatable strings or cosmetical
issues:

4.  The strings "figure", "table", etc. in the "Type" drop down box in
table of contents dialog are not translatable for some reason. Navigate
menu also has entries "Figure" and "Table" (perhaps also more for other
types of floats), which cannot be translated. There seems to be a
missing _() in the source, since adding these strings to .po did not fix
the problem.

These strings also are not extracted to lyx.pot, and I couldn't find
where they come from. (Grepping the sources or default.ui did not reveal
anything.)

5.  In src/frontends/xforms/FormDocument.C some strings like
"default|..." are not translated although they appear in UI. Just adding
_() will likely break something, since these are copied as-is to
BufferParams.

6.  Xgettext guesses that the string "Select unit for width; Scale% for
scaling whole image." (at src/frontends/xforms/FormGraphics.C:148) is in
printf format, although it is not. Adding /* xgettext:no-c-format */ on
front of it it stops msgfmt -c from complaining.

By the way, is there a reason to keep po/POTFILES.in in CVS, although it
is automatically generated by po/Makefile.in.in?


Please CC me, if necessary, as I am currently not subscribed to
lyx-devel.

-- 
Pauli Virtanen

Attachment: qt3-trUtf8-replace.patch
Description: Binary data

Attachment: forms-potfiles.patch
Description: Binary data

Reply via email to