Commit graph

25 commits

Author SHA1 Message Date
Joshua Ferraro
e3f6202979 retab translation script
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-07 02:23:38 -06:00
Joshua Ferraro
80af6de885 fixing encoding declarations to make it easier to translate
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-12 09:00:52 -06:00
tipaul
a3999812e6 rel_3_0 moved to HEAD 2007-03-09 14:52:58 +00:00
tipaul
64cd740d2b synch'ing 2.2 and head 2005-05-04 08:58:30 +00:00
acli
0fbc036392 Some changes from rel_2_2:
Make the generated pot file (i.e., result of "create") look more "real",
but using msgmerge to reformat the output

Script failed to create intermediate directories if the directory of the
target does not exist and the parent of that directory does not exist
either. This should fix that.
2005-02-04 03:49:33 +00:00
acli
2d132d2b6b Added hack to extract and translate strings inside JavaScript CDATA blocks,
using C-like _("some translatable string") notation. English templates will
need to be modified.
2004-03-10 07:00:27 +00:00
acli
db1660f512 Fixed some bugs which caused some context to be not recognized, and some
spurious context to be recognized.  In particular, the bugs fixed are:

1. Failure to recognize INPUT element at the end, e.g., if the input has
   the form "Item number:%S", then the pattern was recognized as only
   "Item number".

2. Failure to remove matching <foo></foo> tags if the pattern contains
   INPUT or TMPL_VAR; e.g., if the input has the form "<h1>%s %s</h1>",
   the form would not be simplified to "%s %s".

Unfortunately, fixing these 2 bugs will cause about 40 fuzzies to appear.
2004-03-08 04:59:38 +00:00
acli
aaeb2d8895 More perldoc updates 2004-03-01 18:46:43 +00:00
acli
15ecec16d9 Perldoc update 2004-03-01 18:16:30 +00:00
acli
66775a8646 - Consider <INPUT type=text> and <INPUT type=text> part of strings.
- If a string is enclosed by a tag, remove that tag from the extracted string
- Generate automatic comments to provide more information for the translator
- A couple bug fixes
2004-02-27 13:26:07 +00:00
acli
09b4e498e2 Bug in previous checkin, because we can't get the number of warnings from
the child.
2004-02-25 03:39:49 +00:00
acli
a399dcefad Benedict wants some message at the end that says success or failure.
It's a good idea too.
2004-02-25 03:37:27 +00:00
acli
f6fa24c75d tmpl_process3.pl did not know how to handle absolute pathnames in -i.
(Actually, xgettext.pl did not know how to handle them in the files listed
in the list of files.)

If the po file is empty (corrupted), $href->{'""'} will be undefined.
We just blindly dereferenced this null value without checking.
2004-02-24 14:20:46 +00:00
acli
8eca8478bb We now have a --help option.
Minor comment update

Removed forced backups and the comment about interrupting xgettext.pl
corrupting the po file, now that we seem to be detecting the situation.
2004-02-24 00:47:53 +00:00
acli
c33a411129 The timestamps in the generated PO file should make a little bit more sense
this way. In any case hard-coding a date didn't make any sense at all.
2004-02-23 22:16:08 +00:00
acli
7975e2ad2e Fixed bug in "create" action reported by Benedict 2004-02-23 20:04:04 +00:00
acli
d03a71a5e2 More bugs that prevented some strings from being translated properly.
This time it's a trimming bug.
2004-02-23 05:51:30 +00:00
acli
dae8ab184b Bug that prevented msgid's with French characters from being translated
should now be really fixed.
2004-02-23 04:26:04 +00:00
acli
ec6562b7d3 Oops, forgot to take out some debugging print statements 2004-02-23 04:02:06 +00:00
acli
77a1d8682d Fold all consecutive whitespaces into single blanks. This avoids problems
when minor whitespace changes occur in the original templates; it also
makes the strings much easier to read (e.g., instead of "foo\n\n\t\t  bar",
xgettext.pl will now always generate "foo bar" and tmpl_process3.pl will
understand it to be the same as the original string).
2004-02-23 01:21:03 +00:00
acli
10a00d1b50 Preliminary support for "analysis" of strings with <a> tags.
Early termination of analysis if we encounter some strings, such as </h1>
or | or ||, in order to avoid extracting strings that are unnecessarily
long and which doesn't add any meaningful context.
2004-02-22 21:34:40 +00:00
acli
9268d4e11c The French character handling fix for tmpl_process3 was not checked in
for some reason.

Try to remove trailing ( in strings too.
2004-02-22 08:18:27 +00:00
acli
b2138f5d0d Handle the iso8859-1 charset somewhat, so that when the po file is in
either iso8859-1 or utf8, msgmerge(1) won't crap out. The code is ugly;
the conversion table is hard-coded, and in some place not very appropriate.

However, this does fix the case where a few strings containing French
characters can't be translated. As a side effect, tmpl_process3 can now
also be used for French or other languages using iso8859-1.
2004-02-22 05:18:52 +00:00
acli
14a62cc0c4 Forgot to check for fuzzy-ness. 2004-02-19 21:28:14 +00:00
acli
8b57901d85 New scripts for translation into Chinese and other languages where English
word order is too different than the word order of the target language to
yield meaningful translations.

The new scripts use a different translation file format (namely standard
gettext-style PO files).

This seems to reasonably work (e.g., producing an empty en_GB translation
then installing seems to not corrupt the "translated" files), but it likely
will still contain some bugs. There is also little documentation, but try
to run perldoc on the .p[lm] files to see what's there. There are also some
spurious warnings (both from bugs in the new scripts and from buggy third-
party Locale::PO module).
2004-02-19 21:24:30 +00:00