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

Tool/unused i18n token finder #457

Closed
wants to merge 8 commits into from
Closed

Conversation

@wlycdgr
Copy link
Member

@wlycdgr wlycdgr commented Oct 3, 2019

Adds a script to tools/ to aid in identifying unused i18n tokens.

  • Have you followed the guidelines in CONTRIBUTING.md?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Have you added an explanation of what your changes do?
  • Does your submission pass tests?
  • Did you lint your code prior to submission?
@wlycdgr wlycdgr requested a review from ghostery/ghostery as a code owner Oct 3, 2019
@wlycdgr wlycdgr requested review from christophertino and zarembsky Oct 3, 2019
Copy link
Contributor

@zarembsky zarembsky left a comment

  1. Ensure that i18n_results directory is created.
  2. Remove unnecessary return statement in getFilepaths.
  3. Add exceptions list to narrow down the list of tokens which should be tested manually. The exceptions should be grouped and commented.
  4. Run lint and check for errors, other than CRLF and console. Example: line 114 misses semicolon.
  5. Add execution time a la i18n-checker.js
  6. Have mercy and rename it to unused-i18n-tokens-finder.js. "Possibly" is already in your PLEASE NOTE output.
  7. Run i18n-checker.js. It wipes out i18n_results, and does not produce results itself, though it reports errors.
  8. Think about using both tools for other projects which may use locales. Maybe it is worth to put these locale tools in a separate repo. Example: edge_build_tools in a separate repo, and to use them you just pull it as a sibling of ghostery-extension.
@wlycdgr
Copy link
Member Author

@wlycdgr wlycdgr commented Oct 10, 2019

Revisions in progress.

  1. done (b20fd10)
  2. done (80e0adb)
  3. done (bab629a)
  4. done (eb21b9f)
@christophertino christophertino modified the milestone: 8.4.4 Oct 16, 2019
@wlycdgr wlycdgr closed this Dec 17, 2019
@wlycdgr wlycdgr deleted the tool/unused-i18n-token-finder branch Jan 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants