incubator-ooo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Serg Bormant <borm...@gmail.com>
Subject Re: [TRANSLATION]: Steps for update or new translation
Date Thu, 29 Mar 2012 06:11:03 GMT
Hi

2012/3/28 Ariel Constenla-Haile <arielch@apache.org>:
> On Wed, Mar 28, 2012 at 09:36:11PM +0400, Serg Bormant wrote:
>> 2012/3/28 Claudio Filho <filhocf@gmail.com>:
>> > Sorry, Risto. For this step, you need to do:
>> >
>> > $ wget http://people.apache.org/~jsc/sdf/en-US.sdf
>> > $ http://svn.apache.org/viewvc/incubator/ooo/trunk/extras/l10n/source/fi/localize.sdf?revision=1229431&view=co
>> > -o fi.SDF
>>
>> $ wget http://people.apache.org/~jsc/sdf/en-US.sdf
>> $ wget http://svn.apache.org/viewvc/incubator/ooo/trunk/extras/l10n/source/fi/localize.sdf?revision=1229431&view=co
>> -O fi.SDF
>
> May be it's better to use Apache Subversion to checkout that file:
>
> svn co https://svn-master.apache.org/repos/asf/incubator/ooo/trunk/extras/l10n/source/fi
>
> Then you can update it, as it get updated by AOO devs.:
>
> cd fi
> svn up
>
>> Lost wget in second line and -O (upper case o) instead of -o
>>
>> > Then you will have the "template" (en_US) more the old translation
>> > (fi) in the same directory, so you can merge in an unique file.
>> >
>> > $ cat en-US.sdf fi.sdf > fi.old.sdf
>> >
>> > After, convert in PO files.
>> >
>> > $ oo2po --source-language=en-US -l fi -i fi.old.sdf fi
>>
>> ... and now you get backtrace with
>>
>> ValueError: invalid tab-delimited line: '#\n'
>
> This is because of the header comment in the localize.sdf. Copy the file
> and remove the first 31 lines of the header:
>
> cp fi/localize.sdf fi-old.sdf
>
> vim fi-old.sdf
> (remove the comments at the beginning)
>
> cat en-US.sdf fi-old.sdf > fi-merged.sdf

Thanks, header was the source of error, not line in the middle of sdf
with literally '#\n' as I mistakenly thought. While the header is 31
line this simple command sequence prepares Russian PO set in ui/ and
help/ directories with the same structure as used in pootle l10n
projects.

$ svn co https://svn.apache.org/repos/asf/incubator/ooo/trunk/extras/l10n/source/ru
ru
$ wget -O en-US.sdf http://people.apache.org/~jsc/sdf/en-US.sdf
$ ( cat en-US.sdf ; tail -n +32 ru/localize.sdf ) > merged.sdf
$ rm ui help
$ oo2po -l ru merged.sdf ui
$ mv ui/helpcontent2 ./help

To update localized .sdf:
$ svn co ru

It would be nice to checkout/update en-US.sdf from svn too. What do
you think about this? On the one hand, the en-US.sdf is not source
file because it is generated based on the source tree, but on the
other it is the starting point (and a source) for l10n process.

-- 
wbr, sb

Mime
View raw message