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

feat(workflow): add string filter for languages #13521

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

michael-smt
Copy link
Contributor

Proposed changes

This adds a new setting to the language workflow of a project to exclude units from translation.

With regional languages it can be useful to only translate a subset of units. This avoid duplicating translations which have to be kept up to date, instead relying on a fallback in the localization framework (e.g. #2320 (comment)). By limiting translation to only the relevant units it is clear what is region specific and the progress can be properly reflected. See also #3412.

For example first you label all units that should be regionalized for British English with a label like uk-regional. Then configure the project's en_GB language workflow with the filter label:uk-regional. Only these units are available for translation to en_GB.

Checklist

  • Lint and unit tests pass locally with my changes.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added documentation to describe my feature.
  • I have squashed my commits into logic units.
  • I have described the changes in the commit messages.

Other information

This PR is far from complete and the filter will need to be added in a lot of places. I first wanted to get a feeling if this feature makes sense.

Also the naming might not be ideal...

Copy link
Member

@nijel nijel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not really convinced this is a practical approach, as this opens up several consistency issues. Two ones I was able to figure out quickly:

  • This will hide the strings from the translating UI while they still being counted for in the statistics, making it impossible to complete the translation.
  • The filtering will apply only at certain levels (when language settings apply) and not other (project- or site-wide search). So you will find the string in the site-wide search, and clicking on it will tell you that the string does not exist.

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