Tool to detect unused locale keys #7978
jonasraoni
started this conversation in
Proposals
Replies: 2 comments
-
@bozana asked about this a few weeks back -- we used to have a tool when we were using XML-based locale keys. It would need a rewrite, but it's here: pkp/ojs@baf1ce4 |
Beta Was this translation helpful? Give feedback.
0 replies
-
One thing to be wary of is that there are places where we are concatenating the locale keys. Things like this: foreach ($types as $type) {
$name = __('some.example.' . $type);
} I've been trying over the years to remove such things when I find them. And I think we should avoid this in any future code. But we'll need to be careful. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the problem you would like to solve
As the code evolves some locale keys might become outdated/unused, and removing them would probably make the life of translators easier, especially for new languages/scripts.
Describe the solution you'd like
Probably a tool to be executed at building (if it's fast enough) or developing time, to display a summary, such as
en_US: 2 possible unused locale keys were found: (...)
would be useful.Checks:
Notes:
pkp-lib
gettext
packageWho is asking for this feature?
Developer
Beta Was this translation helpful? Give feedback.
All reactions