wordpress-mobile / wordpress-mobile/release-toolkit
Fail `generate_strings_file_for_glotpress` when it finds reused keys
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 31
- Forks
- 10
- Avg merge
- 5h 45m
- Merged PRs (30d)
- 2
Description
As discussed in https://github.com/wordpress-mobile/WordPress-iOS/pull/19651, genstrings does not throw an error upon reused keys, only a warning:
That is not acceptable for us, because it leads to these easy to make errors going ignored and possibly making it past the code freeze stage.
I think we should be able to run the genstring output through RegEx that can match strings with the format Key "..." used with multiple values. Value "..." kept. Value "..." ignored., collect all the matches, and return them as errors.
Note: I'm aware "..." is not valid, or useful, for the RegEx, just using it to give an idea of the shape of the text to look for.
See also https://github.com/wordpress-mobile/WordPress-iOS/pull/20030.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the generate_strings_file_for_glotpress entry point and inspect how genstrings output is handled. Check how warnings are currently collected, then verify that reused-key messages matching the described format are returned as errors and that the command fails; the payload names no test file to run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- release, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100