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

MBS-13740: Split report strings into reports translation component #3364

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

reosarevok
Copy link
Member

Implement MBS-13740

Description

Reports are a lot less critical (and include a lot longer strings) than most of the rest of the Server translation component.

Them being in the main Server component means translators spend time working on them early that could be better spent translating other strings a lot more important for daily use of the site, such as relationships and attributes (and the rest of the Server code). Since Server is one of the components we expect to be reasonably complete before we put a language on beta and pretty much complete before we put it on production, this also means an unnecessary delay in making translations available.

Most report strings are also a lot more similar to each other than to the rest of the Server strings, so them being grouped seems like it would simplify translation.

Testing

Tested manually that the report index page loads and shows the right translations.

Notes

I copied the strings into the reports .po files with:

#!/bin/bash
for filename in mb_server.*.po; do
output=${filename/mb_server/reports}
    msggrep $filename -N '../root/report/*' -o $output
done

The migration worked fine but left in the non-report file comments in the .po files - hopefully Weblate can remove those later?

There's an issue here (which means this is a draft for now) in that I understand currently every string in the /report folder will be looked at as an l_reports string, even if it just uses l. There's a few headers and whatnot (such as "Artist", "URL") which would seem silly to move to the reports component, since they should always be the same as elsewhere.

Further action

  1. Update translations and source messages (as in releasing beta)
  2. Merge this pull request introducing the translation domain history
  3. Merge the branch master into beta
  4. Create and set up the translation component Reports in Weblate
  5. Test it
  6. Check that there is still no comment to the strings to be removed
  7. Update translations and source messages (as in releasing beta) again;
    That should clean up the files for the translation domain mb_server.
  8. Release beta completely

Reports are a lot less critical (and include a lot longer strings) than
most of the rest of the Server translation component.

This first commit makes the necessary code changes
to move the translations to a new reports component.
In next commits I'll generate the relevant .pot file,
and generate start .po files to save the currently translated lines.
This copies report string translations from each language's
mb_server.*.po file to a new reports.*.po file
using the following bash snippet:

for filename in mb_server.*.po; do
output=${filename/mb_server/reports}
    msggrep $filename -N '../root/report/*' -o $output
done

Eventually we will want to remove these from mb_server.pot
and the mb_server.*.po files, but first we should test it all works.

The migration worked fine but left in the non-report file comments
in the *.po files - hopefully Weblate can remove those later.
@reosarevok reosarevok added the Refactoring Refactoring-only PRs (eslint fixes etc) label Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Refactoring Refactoring-only PRs (eslint fixes etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant