Configure Weblate #165

Open
opened 2025-04-24 19:27:32 +00:00 by nico.rikken · 15 comments
Member

Finalize the Weblate configuration:

Finalize the [Weblate](https://hosted.weblate.org/projects/fsfe/ada-zangemann/) configuration: - [Version control integration](https://docs.weblate.org/en/latest/vcs.html) - [Configure repository hooks for automated flow of updates to Weblate.](https://docs.weblate.org/en/latest/admin/continuous.html#update-vcs) - [Configure push URL for automated flow of translations from Weblate.](https://docs.weblate.org/en/latest/admin/continuous.html#push-changes) - [Provide context to the translators](https://docs.weblate.org/en/latest/admin/translating.html#additional) - [Add screenshots to show where strings are being used.](https://docs.weblate.org/en/latest/admin/translating.html#screenshots) - Use [flags in source text](https://docs.weblate.org/en/latest/admin/checks.html#customizing-behavior-using-flags) to customize Weblate behavior like priority and validation checks. - Po tips https://docs.weblate.org/en/latest/devel/gettext.html - Prevent duplication of English language with po/en.po and po/Ada_Zangemann.pot by skipping .pot step, changing source language or updating Weblate regex. - Prevent merge conflicts while automatic syncing is not enabled yet https://docs.weblate.org/en/latest/admin/continuous.html#merge-weblate-git - Weblate status badge on readme https://hosted.weblate.org/widgets/fsfe/?component=34680 - REUSE compliance in a way that information is kept up to date with Weblate an in automated way. Weblate can report translators https://docs.weblate.org/en/latest/devel/reporting.html#translator-credits - Document way to resolve issues like https://docs.weblate.org/en/latest/faq.html#how-to-fix-merge-conflicts-in-translations - Document Weblate in automation design documentation. - Simplify character name translations by selecting inner text. - Afterwards email translators mailinglist about Weblate support and request feedback. - Review project-level translator notes that refer to https://fsfe.org/contribute/translators/ to make sure people find the correct information for Ada & Zangemann. - Update translation guideline with more concern for po files https://git.fsfe.org/FSFE/ada-zangemann/src/branch/main/docs/translation-guidelines.md - Configure source browsing https://docs.weblate.org/en/latest/admin/projects.html#component-repoweb - update translation guidance in main repo readme - Add a note in the texts directory that the files might have become outdated with the ongoing efforts in Weblate.
nico.rikken added the Enhancement label 2025-04-24 19:27:32 +00:00
Author
Member

Proposal for priorities:

  • 100: Default (paragraphs, relevant information/data, phrases) -> enough for movie
  • 90: Colophons and chapter titles -> enough for basic digital book including ebook
  • 80: Image alt-text -> for an accessible digital book
  • 70: Capital image links -> optional

Maybe move print colophon to a lower priority.

The metadata and localized filenames could be included in this priority, or moved at an even lower priority so they are at the end of the translation.

Proposal for priorities: - 100: Default (paragraphs, relevant information/data, phrases) -> enough for movie - 90: Colophons and chapter titles -> enough for basic digital book including ebook - 80: Image alt-text -> for an accessible digital book - 70: Capital image links -> optional Maybe move print colophon to a lower priority. The metadata and localized filenames could be included in this priority, or moved at an even lower priority so they are at the end of the translation.
Author
Member

Regex flag can be used for ISBN codes or yes/no parameters. Such a boolean parameter could be used to set whether drop caps are valid for this language.
Marking texts as xml-text with flags can ensure correct use of emphasis tags and escaping of ampersand.
ignore-same can be put on texts that typically remain the same, like the title and authors.

Regex flag can be used for ISBN codes or yes/no parameters. Such a boolean parameter could be used to set whether drop caps are valid for this language. Marking texts as xml-text with flags can ensure correct use of emphasis tags and escaping of ampersand. [ignore-same](https://docs.weblate.org/en/latest/user/checks.html#check-same) can be put on texts that typically remain the same, like the title and authors.
Author
Member

Weblate only support flags in the 'comment' field, according to https://docs.weblate.org/en/latest/formats.html#po But W3C ITS only supports 'description or 'alert' https://www.w3.org/TR/its/#locNote-implementation In the Itstool implementation only the description format is handled effectively https://github.com/itstool/itstool/blob/master/itstool.in There doesn't same to be a way to support comments from itstool.

Maybe there is a way to amend the generated po file with comments? Then again a comment sounds strange for static information about the translation process.

Weblate only support flags in the 'comment' field, according to https://docs.weblate.org/en/latest/formats.html#po But W3C ITS only supports 'description or 'alert' https://www.w3.org/TR/its/#locNote-implementation In the Itstool implementation only the description format is handled effectively https://github.com/itstool/itstool/blob/master/itstool.in There doesn't same to be a way to support comments from itstool. Maybe there is a way to amend the generated po file with comments? Then again a comment sounds strange for static information about the translation process. - [x] Report this issue to Weblate with request to activate flags in descriptions. --> https://github.com/WeblateOrg/weblate/issues/14722
Author
Member

Maybe a po file with Weblate flags in comments can be merged with the translations using msgcat.

Maybe a po file with Weblate flags in comments can be merged with the translations using [msgcat](https://www.gnu.org/software/gettext/manual/html_node/msgcat-Invocation.html).
Author
Member

Most priorities are now manually set in Weblate. I couldn't figure out a way to merge comments, so I chose the manual route.

Most priorities are now manually set in Weblate. I couldn't figure out a way to merge comments, so I chose the manual route.
Author
Member

Add this info to the documentation to describe maintainer issues for weblate:

Each night Weblate takes the intermediary works and commits the work on each language as a commit on the repository of Weblate. This is then pushed to the weblate/translation branch on the FSFE git server. Then a pull request can be created to merge the translations. Weblate automatically rebases on the current main branch. Because of the rebasing, Weblate cannot push to the weblate/translation branch as they have diverted, if only because of the merge commit in the translation pull request. This merge conflict can be prevented by deleting the weblate/translation branch on the FSFE side. Weblate will create it again from its latest starting point.

The Weblate management interface offers controls to commit the intermediary work, pull from the FSFE git server and push to the FSFE
git server. There you can also temporarily lock the translations to prevent contributions that might cause conflicts.

The Weblate docs contain more details of resolving merge conflicts locally:
https://docs.weblate.org/en/latest/admin/continuous.html#merge-weblate-git

Some other notes are in the git issue:
#165

Add this info to the documentation to describe maintainer issues for weblate: > Each night Weblate takes the intermediary works and commits the work on each language as a commit on the repository of Weblate. This is then pushed to the weblate/translation branch on the FSFE git server. Then a pull request can be created to merge the translations. Weblate automatically rebases on the current main branch. Because of the rebasing, Weblate cannot push to the weblate/translation branch as they have diverted, if only because of the merge commit in the translation pull request. This merge conflict can be prevented by deleting the weblate/translation branch on the FSFE side. Weblate will create it again from its latest starting point. > > The Weblate management interface offers controls to commit the intermediary work, pull from the FSFE git server and push to the FSFE git server. There you can also temporarily lock the translations to prevent contributions that might cause conflicts. > > The Weblate docs contain more details of resolving merge conflicts locally: > https://docs.weblate.org/en/latest/admin/continuous.html#merge-weblate-git > > Some other notes are in the git issue: > https://git.fsfe.org/FSFE/ada-zangemann/issues/165
Author
Member

Relevant situation to document: Weblate could no longer push upstream, because there was already a translation branch, but a feature branch was merged upstream before the translation branch was merged, so the translation push branch needed to be rebased. Solution: delete weblate/translation branch in git and again push from Weblate to create a new (rebased) branch.

Relevant situation to document: Weblate could no longer push upstream, because there was already a translation branch, but a feature branch was merged upstream before the translation branch was merged, so the translation push branch needed to be rebased. Solution: delete weblate/translation branch in git and again push from Weblate to create a new (rebased) branch.
Author
Member

Link to URL for creating a new pull-request to merge the translation: https://git.fsfe.org/FSFE/ada-zangemann/compare/main...weblate/translation

Link to URL for creating a new pull-request to merge the translation: https://git.fsfe.org/FSFE/ada-zangemann/compare/main...weblate/translation
Author
Member

Configured Weblate in Files tab to not wrap lines. This will help with diffs and editing in source format, instead of having to deal with newlines.

https://hosted.weblate.org/settings/fsfe/ada-zangemann/#files Files > Translation files > Long lines wrapping : Only wrap lines at newlines (like 'xgettext --no-wrap')

Configured Weblate in Files tab to not wrap lines. This will help with diffs and editing in source format, instead of having to deal with newlines. https://hosted.weblate.org/settings/fsfe/ada-zangemann/#files Files > Translation files > Long lines wrapping : `Only wrap lines at newlines (like 'xgettext --no-wrap')`
Author
Member

Consider adding more words to the glossary, like the character names. Suggested by keunes in https://hosted.weblate.org/translate/fsfe/ada-zangemann/en/?checksum=5001d1b78d08d03d#comments

Consider adding more words to the glossary, like the character names. Suggested by keunes in https://hosted.weblate.org/translate/fsfe/ada-zangemann/en/?checksum=5001d1b78d08d03d#comments
Author
Member

Promote the suggestion feature of Weblate. Weblate user keunes is using this and it facilitate reviews and discussions.

Promote the suggestion feature of Weblate. Weblate user keunes is using this and it facilitate reviews and discussions.
Author
Member

For the glossary, Weblate no longer has a separate glossary. The glossary is a separate component in the current project. More information in the documentation: https://docs.weblate.org/en/latest/user/glossary.html In practice this could mean that there is a separate po file with glossary terms.

Glossaries are used to support translators, so it can be beneficial to use them, especially to help achieve a consistent translation. The character names that are currently part of the main component could also be part of the glossary.

As Weblate shares the glossary component with all components in the same project, the Ada & Zangemann glossary would also be available to translators of other Weblate components. If this would become an issue, an idea would be to have a separate project for Ada & Zangemann. Also, it seems that there is some option of 'categorization' that could be used. This was introduced in https://github.com/WeblateOrg/weblate/pull/9731 found via https://github.com/WeblateOrg/weblate/issues/263 and https://github.com/WeblateOrg/weblate/issues/7550

For the glossary, Weblate no longer has a separate glossary. The glossary is a separate component in the current project. More information in the documentation: https://docs.weblate.org/en/latest/user/glossary.html In practice this could mean that there is a separate po file with glossary terms. Glossaries are used to support translators, so it can be beneficial to use them, especially to help achieve a consistent translation. The character names that are currently part of the main component could also be part of the glossary. As Weblate shares the glossary component with all components in the same project, the Ada & Zangemann glossary would also be available to translators of other Weblate components. If this would become an issue, an idea would be to have a separate project for Ada & Zangemann. Also, it seems that there is some option of 'categorization' that could be used. This was introduced in https://github.com/WeblateOrg/weblate/pull/9731 found via https://github.com/WeblateOrg/weblate/issues/263 and https://github.com/WeblateOrg/weblate/issues/7550
Author
Member

I configured German as the secondary language besides English, so the original German version can be used as another reference. https://docs.weblate.org/en/latest/admin/projects.html#component-secondary-language

I configured German as the secondary language besides English, so the original German version can be used as another reference. https://docs.weblate.org/en/latest/admin/projects.html#component-secondary-language
Author
Member

More glossary suggestions based on the Greek translation:

More glossary suggestions based on the Greek translation: - Custodian https://git.fsfe.org/zvr/ada-zangemann-el/issues/9 - Decommissioned machines https://git.fsfe.org/zvr/ada-zangemann-el/issues/8
Author
Member

Weblate supports for BCP47 for more complex variants, including private tags. This might be interesting to standardize upon. Overview on https://docs.weblate.org/en/latest/admin/languages.html#parsing-language-codes with https://www.rfc-editor.org/rfc/rfc5646.html for language code definitions.

Weblate supports for BCP47 for more complex variants, including private tags. This might be interesting to standardize upon. Overview on https://docs.weblate.org/en/latest/admin/languages.html#parsing-language-codes with https://www.rfc-editor.org/rfc/rfc5646.html for language code definitions.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: FSFE/ada-zangemann#165