Handling of repeated strings in packages-i18n

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

Handling of repeated strings in packages-i18n

Alessio Adamo
Dear admins,

I know that achieving a full translation of project 'packages-i18n' is
really hard, but sometimes is unnecessarily repetitive.

For instance there are hundreds of messages like:

    Translations for package name_of_package

Followed by:

    Provides translations for the "name_of_package" package.

Would it be possible to start handling them with variable
substitutions? That is:

    Translations for package %{name_of_package}
    Provides translations for the "%{name_of_package}" package.


Kind regards

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

Reply | Threaded
Open this post in threaded view
|

Re: Handling of repeated strings in packages-i18n

Sarah Julia Kriesch
Hello Alessio,

can you tell us, where you have found an example of this message, please?
The most important translation file is patterns in packages-i18n.

Best regards,
Sarah



> Gesendet: Donnerstag, 10. Mai 2018 um 18:58 Uhr
> Von: "Alessio Adamo" <[hidden email]>
> An: "openSUSE Translation" <[hidden email]>
> Betreff: [opensuse-translation] Handling of repeated strings in packages-i18n
>
> Dear admins,
>
> I know that achieving a full translation of project 'packages-i18n' is
> really hard, but sometimes is unnecessarily repetitive.
>
> For instance there are hundreds of messages like:
>
>     Translations for package name_of_package
>
> Followed by:
>
>     Provides translations for the "name_of_package" package.
>
> Would it be possible to start handling them with variable
> substitutions? That is:
>
>     Translations for package %{name_of_package}
>     Provides translations for the "%{name_of_package}" package.
>
>
> Kind regards
>
> Alessio
> --
> 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: Handling of repeated strings in packages-i18n

Ludwig Nussel
In reply to this post by Alessio Adamo
Alessio Adamo wrote:

> Dear admins,
>
> I know that achieving a full translation of project 'packages-i18n' is
> really hard, but sometimes is unnecessarily repetitive.
>
> For instance there are hundreds of messages like:
>
>     Translations for package name_of_package
>
> Followed by:
>
>     Provides translations for the "name_of_package" package.
>
> Would it be possible to start handling them with variable
> substitutions? That is:
>
>     Translations for package %{name_of_package}
>     Provides translations for the "%{name_of_package}" package.

Not completely trivial but since the text is generated by the
%lang_package macro¹, the translation extrator script² could of
course detect that pattern and normalize it back to the macro form
for translators. Then the script that actually generates the
translated repo data³ could again detect the pattern and do the
right gettext call. All doable and pull requests are certainly
welcome. Since package translations are considered rather low
priority (SLE only translates patterns for example) I don't see
myself investing time into that detail.

If we wanted to optimize package translations I think we'd need some
kind of package database so translations can be done by package,
with proper grouping and maybe integration with software.o.o. But
then software.o.o is primarily based on appdata, so that would have
to be integrated too...


[1] /usr/lib/rpm/suse_macros
[2] https://github.com/openSUSE/packages-i18n/blob/master/50-tools/repomd2gettext.py
[3] https://github.com/openSUSE/instsource-susedata/blob/master/add_product_susedata#L340

--
 (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]