-
Notifications
You must be signed in to change notification settings - Fork 345
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
For nested pluralization keys, i18n-ally usage report inaccurately indicates unused/not found keys #953
Labels
bug
Something isn't working
Comments
mkevinosullivan
added a commit
to Shopify/i18n-ally
that referenced
this issue
Jun 27, 2023
Derived keys (e.g., such as plurals) were being miscategorised as missing in the usage report. This commit checks if keys derived from those found in the missing list (keys that are in use but considered "not defined") are included in the list of idle keys (keys defined but not considered in use), indicating that they are indeed defined and in use. Fixes lokalise#953
mkevinosullivan
added a commit
to Shopify/i18n-ally
that referenced
this issue
Jun 28, 2023
Derived keys (e.g., such as plurals) were being miscategorised as missing in the usage report. This commit checks if keys derived from those found in the missing list (keys that are in use but considered "not defined") are included in the list of idle keys (keys defined but not considered in use), indicating that they are indeed defined and in use. Fixes lokalise#953
huacnlee
pushed a commit
to huacnlee/i18n-ally
that referenced
this issue
Aug 28, 2023
* Return first available counting value if nested * Add extraction support to react-i18next framework This commit adds the `supportAutoExtraction` array of supported formats and the `detectHardStrings` method from `GeneralFramework` to enable hard-coded string extraction for react-i18next framework, without needing the "general" framework to be enabled/loaded in the `.vscode/settings.json` file. * Add i18next-shopify framework This commit adds the i18next-shopify framework to the list of supported frameworks. It is an extension of the React i18next framework, with some configuration changes. Also add i18next-shopify example app, including a pluralization example. * Add support for Go to Definition of a translation key * Fixes usage report for non-missing derived keys Derived keys (e.g., such as plurals) were being miscategorised as missing in the usage report. This commit checks if keys derived from those found in the missing list (keys that are in use but considered "not defined") are included in the list of idle keys (keys defined but not considered in use), indicating that they are indeed defined and in use. Fixes lokalise#953 * Fixes Current File Panel report of not found keys Derived keys (e.g., such as plurals) are being miscategorised as not found in the Current File Panel report. This commit checks if any existing key paths match derived keys paths, and if so, includes them in the list of in use key paths and removed from the "not found" list. Fixes lokalise#959 * Chore: fix spellings in code base --------- Co-authored-by: Kevin O'Sullivan <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When using nested pluralization keys, e.g., with a locale file like
and a code snippet of
the usage report indicates that the
levelOne.levelTwo
key is missing, and that keyslevelOne.levelTwo.one
andlevelOne.levelTwo.other
are not in use.When using nested pluralization keys, the expectation would be that
levelOne.levelTwo
is not reported as missing and that keyslevelOne.levelTwo.one
andlevelOne.levelTwo.other
are considered in use IFlevelOne.levelTwo
is used in the source file.Extension Version
i18n Ally (v2.9.1)
Framework/i18n package you are using
react-i18next
(will also apply to yet-to-be-releasedi18next-shopify
framework, based onreact-i18next
)To Reproduce
Steps to reproduce the behavior:
examples/by-framework/react-i18next
in thei18n-ally
repopublic/locales/en/translation.json
file to besrc/App.jsx
file and add the following component afterMyComponent
:Device Information
Extension Log
Go to
View
->Output
->i18n Ally
, and paste the content below.The text was updated successfully, but these errors were encountered: