Sorting of package names in Weblate

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Sorting of package names in Weblate

Karl Ove Hufthammer
Currently, the strings in ‘packages-in’ are sorted *alphabetically* in
Weblate. This makes it unncessarily hard to translate them (and to
ensure consistency and high quality translations), as we lose all
context, since, e.g. the name/summary of a package is in a completely
different place in the translation file than its description. And
related strings (e.g. of the package, foo, foo-devel, foo-lib, foo-bar,
foo-baz) are scattered all over the file.

Could this be fixed? It looks like in the translation templates, a
natural ordering is used (i.e., the strings are sorted by package name,
*not* by the content of the strings):

https://github.com/openSUSE/packages-i18n/blob/master/50-pot/b.pot

This is the best way to sort the strings, as the ‘summary’ string of a
package is always followed by the corresponding ‘description’ string,
and related strings (e.g. of baloo5, baloo5-file, baloo5-import,
baloo5-kioslaves etc.) are grouped to together.

But in the *PO* files generated from the POT files (and the translation
strings) shown in Weblate, this perfect ordering of strings have been
destroyed, and the strings are sorted alphabetically:

https://github.com/openSUSE/packages-i18n/blob/master/fr/po/b.fr.po

 From what I can see, this is caused by giving the ‘-s’ argument to
msgmerge here in the file, which sorts the strings alphabetically, so
they no longer match the POT file:

https://github.com/openSUSE/packages-i18n/blob/master/50-tools/mergepo.sh

If this is true, fixing this problem should just involve removing the
‘-s’ argument.

Could this be fixed? It would make the translators’ work much easier.

--
Regards,
Karl Ove Hufthammer

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Sorting of package names in Weblate

Sarah Julia Kriesch
Hello Stanislav,

can you give us feedback to this idea? Thanks!

Best regards,
Sarah

> Gesendet: Samstag, 22. Juli 2017 um 15:21 Uhr
> Von: "Karl Ove Hufthammer" <[hidden email]>
> An: [hidden email]
> Betreff: [opensuse-translation] Sorting of package names in Weblate
>
> Currently, the strings in ‘packages-in’ are sorted *alphabetically* in
> Weblate. This makes it unncessarily hard to translate them (and to
> ensure consistency and high quality translations), as we lose all
> context, since, e.g. the name/summary of a package is in a completely
> different place in the translation file than its description. And
> related strings (e.g. of the package, foo, foo-devel, foo-lib, foo-bar,
> foo-baz) are scattered all over the file.
>
> Could this be fixed? It looks like in the translation templates, a
> natural ordering is used (i.e., the strings are sorted by package name,
> *not* by the content of the strings):
>
> https://github.com/openSUSE/packages-i18n/blob/master/50-pot/b.pot
>
> This is the best way to sort the strings, as the ‘summary’ string of a
> package is always followed by the corresponding ‘description’ string,
> and related strings (e.g. of baloo5, baloo5-file, baloo5-import,
> baloo5-kioslaves etc.) are grouped to together.
>
> But in the *PO* files generated from the POT files (and the translation
> strings) shown in Weblate, this perfect ordering of strings have been
> destroyed, and the strings are sorted alphabetically:
>
> https://github.com/openSUSE/packages-i18n/blob/master/fr/po/b.fr.po
>
>  From what I can see, this is caused by giving the ‘-s’ argument to
> msgmerge here in the file, which sorts the strings alphabetically, so
> they no longer match the POT file:
>
> https://github.com/openSUSE/packages-i18n/blob/master/50-tools/mergepo.sh
>
> If this is true, fixing this problem should just involve removing the
> ‘-s’ argument.
>
> Could this be fixed? It would make the translators’ work much easier.
>
> --
> Regards,
> Karl Ove Hufthammer
>
> --
> To unsubscribe, e-mail: [hidden email]
> To contact the owner, e-mail: [hidden email]
>
>
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Sorting of package names in Weblate

Carlos E. R.-2
In reply to this post by Karl Ove Hufthammer
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



On Saturday, 2017-07-22 at 15:21 +0200, Karl Ove Hufthammer wrote:

> Currently, the strings in ‘packages-in’ are sorted *alphabetically* in
> Weblate. This makes it unncessarily hard to translate them (and to ensure
> consistency and high quality translations), as we lose all context, since,
> e.g. the name/summary of a package is in a completely different place in the
> translation file than its description. And related strings (e.g. of the
> package, foo, foo-devel, foo-lib, foo-bar, foo-baz) are scattered all over the
> file.

I can mention that this has been a problem well before weblate.

- --
Cheers,
        Carlos E. R.
        (from 42.2 x86_64 "Malachite" at Telcontar)

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iEYEARECAAYFAllzcDAACgkQtTMYHG2NR9V6uwCfZQT66LBBGCPbxIpg9siEGPWG
4nUAmwSFlfIlCoA3u+UQ8Tyy+rkS7kjz
=S3iv
-----END PGP SIGNATURE-----
Reply | Threaded
Open this post in threaded view
|

Re: Sorting of package names in Weblate

Stanislav Brabec
In reply to this post by Sarah Julia Kriesch
Sarah Julia Kriesch wrote:
> Hello Stanislav,
>
> can you give us feedback to this idea? Thanks!
>
It seems that Weblate itself uses natural order inside the po file.

So the order in the po file matters.

Ludwig Nussel is the author of
https://github.com/openSUSE/packages-i18n/blob/master/50-tools/mergepo.sh,
so I would ask him first. I am not sure, where the script runs and if
the change requires deploying.

>
>> Gesendet: Samstag, 22. Juli 2017 um 15:21 Uhr
>> Von: "Karl Ove Hufthammer" <[hidden email]>
>> An: [hidden email]
>> Betreff: [opensuse-translation] Sorting of package names in Weblate
>>
>> Currently, the strings in ‘packages-in’ are sorted *alphabetically* in
>> Weblate. This makes it unncessarily hard to translate them (and to
>> ensure consistency and high quality translations), as we lose all
>> context, since, e.g. the name/summary of a package is in a completely
>> different place in the translation file than its description. And
>> related strings (e.g. of the package, foo, foo-devel, foo-lib, foo-bar,
>> foo-baz) are scattered all over the file.
>>
>> Could this be fixed? It looks like in the translation templates, a
>> natural ordering is used (i.e., the strings are sorted by package name,
>> *not* by the content of the strings):
>>
>> https://github.com/openSUSE/packages-i18n/blob/master/50-pot/b.pot
>>
>> This is the best way to sort the strings, as the ‘summary’ string of a
>> package is always followed by the corresponding ‘description’ string,
>> and related strings (e.g. of baloo5, baloo5-file, baloo5-import,
>> baloo5-kioslaves etc.) are grouped to together.
>>
>> But in the *PO* files generated from the POT files (and the translation
>> strings) shown in Weblate, this perfect ordering of strings have been
>> destroyed, and the strings are sorted alphabetically:
>>
>> https://github.com/openSUSE/packages-i18n/blob/master/fr/po/b.fr.po
>>
>>  From what I can see, this is caused by giving the ‘-s’ argument to
>> msgmerge here in the file, which sorts the strings alphabetically, so
>> they no longer match the POT file:
>>
>> https://github.com/openSUSE/packages-i18n/blob/master/50-tools/mergepo.sh
>>
>> If this is true, fixing this problem should just involve removing the
>> ‘-s’ argument.
>>
>> Could this be fixed? It would make the translators’ work much easier.
>>
>> --
>> Regards,
>> Karl Ove Hufthammer
>>
>> --
>> To unsubscribe, e-mail: [hidden email]
>> To contact the owner, e-mail: [hidden email]
>>
>>

--
Best Regards / S pozdravem,

Stanislav Brabec
software developer
---------------------------------------------------------------------
SUSE LINUX, s. r. o.                         e-mail: [hidden email]
Křižíkova 148/34 (Corso IIa)                  tel: +49 911 7405384547
186 00 Praha 8-Karlín                          fax:  +420 284 084 001
Czech Republic                                    http://www.suse.cz/
PGP: 830B 40D5 9E05 35D8 5E27 6FA3 717C 209F A04F CD76
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Sorting of package names in Weblate

Alex Minton
Stanislav Brabec 24 июля 2017 г. 18:02:37 MSK:

> Sarah Julia Kriesch wrote:
> > Hello Stanislav,
> >
> > can you give us feedback to this idea? Thanks!
>
> It seems that Weblate itself uses natural order inside the po file.
>
> So the order in the po file matters.
>
> Ludwig Nussel is the author of
> https://github.com/openSUSE/packages-i18n/blob/master/50-tools/mergepo.sh,
> so I would ask him first. I am not sure, where the script runs and if
> the change requires deploying.
>
Initial version of 50-tools/mergepo.sh by Ludwig from 10 days ago doesn't
bring any new function compared to 50-tools/merge_pots.sh by me from 9 months
ago (pre-Weblate age, manual re-merging only).
Shouldn't Weblate merge the translations with pot files on it's own? IIRC, one
of the points to deploy Weblate at all was to automate keeping translations in
sync with pot files. If YES, then from my point of view running any of those
scripts automatically anywhere would be a HUGE mistake, as it duplicates
Weblate functions.
If NO, it would be sad, but re-merging the po files to make them properly
sorted again is a matter of several minutes. Don't know how fast Weblate will
pick up the changes from direct git commit. Anyway, I can fix the files tomorrow
if nobody objects.

--
Regards, Minton

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Sorting of package names in Weblate

Ludwig Nussel
Alex Minton wrote:

> Stanislav Brabec 24 июля 2017 г. 18:02:37 MSK:
>> Sarah Julia Kriesch wrote:
>>> Hello Stanislav,
>>>
>>> can you give us feedback to this idea? Thanks!
>>
>> It seems that Weblate itself uses natural order inside the po file.
>>
>> So the order in the po file matters.
>>
>> Ludwig Nussel is the author of
>> https://github.com/openSUSE/packages-i18n/blob/master/50-tools/mergepo.sh,
>> so I would ask him first. I am not sure, where the script runs and if
>> the change requires deploying.
>>
> Initial version of 50-tools/mergepo.sh by Ludwig from 10 days ago
> doesn't bring any new function compared to 50-tools/merge_pots.sh by
> me from 9 months ago (pre-Weblate age, manual re-merging only).

Must have been blind. I didn't see that pre existing script :-) Sorry
for the duplication, feel free to delete one.

> Shouldn't Weblate merge the translations with pot files on it's own? IIRC, one
> of the points to deploy Weblate at all was to automate keeping translations in
> sync with pot files. If YES, then from my point of view running any of those
> scripts automatically anywhere would be a HUGE mistake, as it duplicates
> Weblate functions.
> If NO, it would be sad, but re-merging the po files to make them properly
> sorted again is a matter of several minutes. Don't know how fast Weblate will
> pick up the changes from direct git commit. Anyway, I can fix the files tomorrow
> if nobody objects.

The pot file has to be updated with an external script anyways. So
we can merge the po files in the same run. Weblate doesn't do that
for us.

Btw, Tumbleweed is in the process of switching to repomd. So the
package description extractor that relies on susetags will stop
working at some point. Let me know if you need help porting that to
repomd.

cu
Ludwig

--
  (o_   Ludwig Nussel
  //\
  V_/_  http://www.suse.com/
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard,
Graham Norton, HRB 21284 (AG Nürnberg)
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Sorting of package names in Weblate

Alex Minton
In reply to this post by Stanislav Brabec
Stanislav Brabec 24 июля 2017 г. 18:02:37 MSK:
> It seems that Weblate itself uses natural order inside the po file.
>
> So the order in the po file matters.
OK, I've committed fixed po files to github today. Let's see how fast Weblate
will pick up.

--

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Sorting of package names in Weblate

Alex Minton
In reply to this post by Ludwig Nussel
Ludwig Nussel 25 июля 2017 г. 10:40:13 MSK:
> Btw, Tumbleweed is in the process of switching to repomd. So the
> package description extractor that relies on susetags will stop
> working at some point. Let me know if you need help porting that to
> repomd.
Hmm, it would help if you give some more info on that change, cause the script
pushing the translations back to the repo will also need porting.
Maybe there is already some repomd repo in OBS available for tests?

--
Regards, Minton
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]