Mailinglist Archive: opensuse-translation (103 mails)

< Previous Next >
Re: [opensuse-translation] lokalize
On Tue, Apr 10, 2012 at 2:12 PM, Carlos E. R.
<robin.listas@xxxxxxxxxxxxxx> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2012-04-10 13:31, Leandro Regueiro wrote:
On Tue, Apr 10, 2012 at 12:57 PM, Carlos E. R. <> wrote:

If you have a link to the howto documenting this, perhaps.

Since you want to check rules, you must be interested in this
particular sieve:
http://pology.nedohodnik.net//doc/user/en_US/ch-sieve.html#sv-check-rules
The check-rules sieve allows to open the files in Lokalize if you pass
the lokalize option to the posieve command. I also recommend you to
read the introductory text to that particular chapter at the top of
that webpage (sections 3.1 to 3.4, both included).

That link is a man page - useless. I need the exact command line to give
and exactly how to integrate with lokalize. A howto document, not a list of
options.

http://wiki.trasno.net/Uso_de_Pology_en_GNOME

Also, it appears that what it does is generate a file of errors that you
can open in lokalize - how do I put that automatically back on the full file?

No. It opens the files with errors in Lokalize, but showing only the
strings with errors. If you edit the strings with errors and save the
file, you are editing the whole file and saving the whole file, but
you only saw the strings with errors.

This is far more complex than clicking on the file in kbabel. There I
correct the error and the message goes automatically from red to black:
error solved. I only have to click save and done.

Here you run posieve with the appropiate options. Then you edit the
affected strings and you save.

I will put a link to our translation group wiki with information in
galician about how to use Pology to run the checks, but right now the
site seems to be not working. I will try again later.

If you do it in English it would be of general use.

I already put the link to the galician docs upside, but it is simple.

You download Pology, and since it is in a svn server you just have to
run the appropiate command (available in the above page). Once you
have Pology somewhere in your computer, you just have to open a
command line and run the scripts that are in the bin subdirectory.
Pology has several scripts, but here we are just going to focus in
posieve.

posieve is used to apply sieves to the .po files. Among the several
available sieves the ones that may be more interesting are check-rules
(for checking a bunch of user defined rules) (Pology comes with a lot
of these rules and you can contribute more) and check-spell-ec (for
checking the spell using enchant). posieve accepts several options,
and each sieve has its particular options too. For specifying each
particular sieve's options you have to preceed them with -s, which is
the posieve option to specify options for the sieves. For example if
you want to specify the lang:gl option for the check-rules sieve you
have to write -slang:gl in the command line. For example for checking
for errors in user defined rules and open the wrong strings in
Lokalize you can run:

posieve -b --msgfmt-check --no-skip check-rules -slang:gl
-s"rulerx:^PT*" -saccel:_ -snorulerx:dual -slokalize
core/nautilus/po/gl.po

posieve is the command,
-b is for skiping obsolete strings,
--msgfmt-check is for checking file validity with msgfmt -c,
--no-skip is for not skipping problematic strings,
check-rules is the name of the sieve used
-slang:gl is for applying the rules for galician (just change the
language code)
-s"rulerx:^PT*" is for specifying just the rules that start with
"PT" (we are applying a regular expression to match the rule's names)
(we have several classes of rules and we group them by the name)
-saccel:_ tells the sieve to strip the _ accelerators from each
string before checking the rules (you can use other accelerators such
as &)
-snorulerx:dual tells the sieve to not use the rules with names that
match this regular expression
-slokalize is for opening the strings with errors in lokalize
core/nautilus/po/gl.po is a file, so just put here the path to
another file (you can pass here several files, which is useful to
check hundreds of files in a row)

You have a complete list of options for this particular sieve in
http://pology.nedohodnik.net//doc/user/en_US/ch-sieve.html#sv-check-rules
The list of options for posieve is available in
http://pology.nedohodnik.net//doc/user/en_US/ch-sieve.html#sec-svoptions

Bye
--
To unsubscribe, e-mail: opensuse-translation+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-translation+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups