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

Check for unused translations #728

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

Conversation

michaelarnauts
Copy link
Contributor

I was just playing around with some things that we could check:

Current master branch has these unused translations:

No usage found for translation:
msgctxt "#30409"
msgid "episode"
msgstr ""

No usage found for translation:
msgctxt "#30957"
msgid ""
"Please increase the maximum bandwidth. Maximum bandwidth is set to {max} "
"kbps, but this stream needs a minimum of {min} kbps."
msgstr ""

@michaelarnauts
Copy link
Contributor Author

Note that this does an extremely naive check. I hope we never calculate with translation id's :)

@dagwieers
Copy link
Collaborator

I wonder if there is a standardized framework for checks in Python?

@dagwieers
Copy link
Collaborator

@michaelarnauts We prefer not to create branches in the main project, as they may get copied to other contributors and are not being cleaned up automatically. So it is best to create branches in your personal fork, and then make a PR from your personal fork branch to the master branch in this project.

(In fact we disallow this, but since you are an owner of Add-ons, you trump any restrictions, I think)

@michaelarnauts
Copy link
Contributor Author

Ow. Sorry. I'll make sure I setup my origins correctly.

@dagwieers dagwieers added the testing Related to automated testing label May 1, 2020
@dagwieers
Copy link
Collaborator

I think a check like this is definitely useful (also in the wider community), but I would like to see if we can fit this better in a framework rather than have it as a standalone script.

Also in some cases keeping unused translations might be deliberate and possibly temporary. That said, making this transparent is a win, always.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Related to automated testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants