I have written a simple script to ease merging changes into existing
l10n. It takes output of Axel's compare-locales and then modifies your
files accordingly. Removes obsolete lines and files and adds missing
ones.
The usage is simple:
./patch-locale.py reference_dir l10n_dir
And that is it.
When adding new lines the script writes FIXME before them so you can
easily find those untranslated lines later. It helps to get your
localization back on green so you can test partly-translated work.
Installation:
* install compare-locales (http://developer.mozilla.org/en/docs/
Compare-locales), I tested with version 0.4.23
* grab http://clear.com.ua/misc/patch-locale.py
--
yours, Tim
Hi Tim,
I think I can spot bugs :-/.
<!ENTITY stress.test "This is a notorious
unneeded
entity
entry
with more than one line.">
There are some files where order matters, too, sadly.
I'm currently working on a whacking of compare-locales, not sure if
that's going to impact your stuff. Possibly not. But the whole "get the
app directories" stuff will change for 3.1. And it's currently able to
merge out of band, which is interesting for build, but not for actual
localization.
Anyway, any kind of merge based on my lib is likely going to be rather
ad-hoc, gandalf is working on some interesting alternative. It's based
on a more powerful lib, but might be slower, and is currently trickier
to use in your own scripts. Anyway, I'll leave it up to him to blog or
post about that.
Axel
I know, and other issue I am aware of is that it does not copy related
comments.
Through it is still useful for me and I thought it may help somebody
working on Sunbird these days.
> I'm currently working on a whacking of compare-locales, not sure if
> that's going to impact your stuff. Possibly not. But the whole "get the
> app directories" stuff will change for 3.1. And it's currently able to
> merge out of band, which is interesting for build, but not for actual
> localization.
>
> Anyway, any kind of merge based on my lib is likely going to be rather
> ad-hoc, gandalf is working on some interesting alternative. It's based
> on a more powerful lib, but might be slower, and is currently trickier
> to use in your own scripts. Anyway, I'll leave it up to him to blog or
> post about that.
Looking forward for that.