Hi all, I haven't found a set of instructions from the project maintainer's point of view for adding a new project for localization in Damned Lies, and everytime I feel that linking a page to the maintainer would be more inviting.
Having that in mind, I drafted a page that would probably fit as an item in the "For maintainers/developers of modules" section of TranslationProject wiki page [1]. It is in Markdown, as it was easier for me to generate a HTML output, but I would reformat in MediaWiki syntax to create the wiki page. Please find attached the draft both in Markdown and HTML file formats. Any thoughts? Feedbacks? [1] https://wiki.gnome.org/TranslationProject/#For_maintainers.2Fdevelopers_of_modules Best regards, Rafael Fontenelle
Checklist for adding software to Damned Lies
For source code repository hosted in GNOME GitLab:
- The repository must be in a non-personal namespace (e.g. GNOME for core apps or World for circle apps). Request sysadmins to move the repository to the proper namespace.
- Tidy up localization-related files:
- Make sure .doap file is properly set with
and other tags, See Git/FAQ for an example. - Make sure po/POTFILES.in exists (rename po/POTFILES to it)
- Make sure po/POTFILES.in is up to date with all sources files containing translatable strings. See set of instructions below.
- Make sure .doap file is properly set with
- Add @translations user as a member of your repository with Developer role
- If branch protection is enabled (default), make sure to allow Developer role to push commits. See Protected branches.
- Request translation coordinators in gnome-i18n mailing list to add this project to Damned Lies
For source code repository hosted in other software forges (GitHub, GitLab, etc.):
- Tidy up localization-related files:
- Make sure po/POTFILES.in exists (rename po/POTFILES to it)
- Make sure po/POTFILES.in is up to date with all sources files containing translatable strings. See set of instructions below.
- Request translation coordinators in gnome-i18n mailing list to add this project to Damned Lies
Updating POTFILES
Here is a suggestion on updating POTFILES:
- First, fill in the po/POTFILES.in with all files that potentially have translatable strings. Use the negative
! -name
to exclude files known to not have translatable strings, like images and stylesheets. For instance, for a Rust project:
find data/ src/ -type f ! -name '*.build' ! -name '*.svg' ! -name '*.css' ! -name 'config.rs' ! -name 'config.rs.in' > po/POTFILES.in
Then, set up your project, by using
./configure
for autoconf-based projects andmeson . build
for Meson buildsystem-based projects. Dependencies might need to be satisfied.Then update the .pot file. This may vary across project. On projects using Meson buildsystem, should be something like (
projectname
is the name set on meson.build):
ninja -C build <projectname>-pot
- Set po/POTFILES.in with the actually list of source files that now have translatable strings in the .pot file. For instance:
grep '^#: ' po/<projectname>-pot | cut -d: -f2 | sed 's|^ ||' | sort -u > po/POTFILES.in
Now you should have a up-to-date po/POTFILES.in.
## Checklist for adding software to Damned Lies ### For source code repository hosted in [GNOME GitLab]: 1. The repository must be in a non-personal namespace (e.g. [GNOME] for core apps or [World] for [circle apps]). [Request sysadmins] to move the repository to the proper namespace. 2. Tidy up localization-related files: - Make sure .doap file is properly set with <maintainer> and other tags, See [Git/FAQ] for an example. - Make sure po/POTFILES.in exists (rename po/POTFILES to it) - Make sure po/POTFILES.in is up to date with all sources files containing translatable strings. See set of instructions below. 3. Add @translations user as a member of your repository with Developer role 4. If branch protection is enabled (default), make sure to allow Developer role to push commits. See [Protected branches]. 5. Request translation coordinators in [gnome-i18n mailing list] to add this project to Damned Lies ### For source code repository hosted in other software forges (GitHub, GitLab, etc.): 1. Tidy up localization-related files: - Make sure po/POTFILES.in exists (rename po/POTFILES to it) - Make sure po/POTFILES.in is up to date with all sources files containing translatable strings. See set of instructions below. 2. Request translation coordinators in [gnome-i18n mailing list] to add this project to Damned Lies ## Updating POTFILES Here is a suggestion on updating POTFILES: 1. First, fill in the po/POTFILES.in with all files that potentially have translatable strings. Use the negative `! -name` to exclude files known to not have translatable strings, like images and stylesheets. For instance, for a Rust project: ``` find data/ src/ -type f ! -name '*.build' ! -name '*.svg' ! -name '*.css' ! -name 'config.rs' ! -name 'config.rs.in' > po/POTFILES.in ``` 2. Then, set up your project, by using `./configure` for autoconf-based projects and `meson . build` for Meson buildsystem-based projects. Dependencies might need to be satisfied. 3. Then update the .pot file. This may vary across project. On projects using Meson buildsystem, should be something like ("projectname" is the name set on meson.build): ``` ninja -C build <projectname>-pot ``` 4. Set po/POTFILES.in with the actually list of source files that now have translatable strings in the .pot file. For instance: ``` grep '^#: ' po/<projectname>-pot | cut -d: -f2 | sed 's|^ ||' | sort -u > po/POTFILES.in ``` Now you should have a up-to-date po/POTFILES.in. [GNOME GitLab]: https://gitlab.gnome.org [GNOME]: https://gitlab.gnome.org/GNOME [World]: https://gitlab.gnome.org/World [circle apps]: https://circle.gnome.org/ [Request sysadmins]: https://gitlab.gnome.org/Infrastructure/Infrastructure/-/issues [Git/FAQ]: https://wiki.gnome.org/Git/FAQ#How_do_I_add_a_description_to_the_git_web_view.3F__What_is_this_.22blah.doap.22.3F [Protected branches]: https://docs.gitlab.com/ee/user/project/protected_branches.html [gnome-i18n mailing list]: https://mail.gnome.org/mailman/listinfo/gnome-i18n
_______________________________________________ gnome-i18n mailing list gnome-i18n@gnome.org https://mail.gnome.org/mailman/listinfo/gnome-i18n