Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translation related patches #108

Merged
merged 3 commits into from
Apr 1, 2024
Merged

Translation related patches #108

merged 3 commits into from
Apr 1, 2024

Conversation

yakushabb
Copy link
Contributor

@yakushabb yakushabb commented Mar 31, 2024

appdata: translate=no properties

It appears that the appstream project no longer supports translatable=no properties, and gettext extract the translatable=no marked strings as translatable.

I opened an issue to inform about the situation, but translatable=no properties are not accepted by developers. You can find the issue here: https://github.com/ximion/appstream/issues/623

Please test your script or string extraction process before merging this PR.

In MetaInfo files, each individual paragraph of a description
(or enumerated entry) is translated individually, however,
you can only exclude the complete block from being translated
by adding translate="no" to the description element.

Source: https://freedesktop.org/software/appstream/docs/sect-Quickstart-Translation.html

appdata: Add developer ID

Flathub requires a developer tag and developer ID.

A developer tag with a name child tag must be present. Only one developer tag is allowed and the name tag also must be present only once in untranslated form.

<developer id="tld.vendor">
  <name>Developer name</name>
</developer>

Source: https://docs.flathub.org/docs/for-app-authors/metainfo-guidelines/#name-summary-and-developer-name

i18n: Use C_ alias for pgettext

That way it's easy to catch a translatable string.

It appears that the appstream project no longer supports
`translatable=no` properties, and gettext extract the
`translatable=no` marked strings as translatable.

I opened an issue to inform about the situation, but `translatable=no`
properties are not accepted by developers. You can find the issue
here: `https://github.com/ximion/appstream/issues/623`

**Please test your script or string extraction process before merging this PR.**

> In MetaInfo files, each individual paragraph of a description
> (or enumerated entry) is translated individually, however,
> you can only exclude the complete block from being translated
> by adding `translate="no"` to the description element.

Source: https://freedesktop.org/software/appstream/docs/sect-Quickstart-Translation.html
Flathub requires a developer tag and developer ID.

> A developer tag with a name child tag must be present. Only one developer tag is allowed and the name tag also must be present only once in untranslated form.

```
<developer id="tld.vendor">
  <name>Developer name</name>
</developer>
```
Source: https://docs.flathub.org/docs/for-app-authors/metainfo-guidelines/#name-summary-and-developer-name
That way it's easy to catch a translatable string.
@yakushabb yakushabb changed the title appdata: translate=no properties Translation related patches Mar 31, 2024
@amit9838
Copy link
Owner

amit9838 commented Apr 1, 2024

@yakushabb I tested i18n: Use C_ alias for pgettext it works as expected, thanks for your contribution.

@amit9838 amit9838 merged commit 01d3bf6 into amit9838:master Apr 1, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants