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

Kebab-cased translation key warning when running just p frontend i18n #3938

Closed
sarayourfriend opened this issue Mar 19, 2024 · 1 comment · Fixed by #3951
Closed

Kebab-cased translation key warning when running just p frontend i18n #3938

sarayourfriend opened this issue Mar 19, 2024 · 1 comment · Fixed by #3951
Assignees
Labels
🕹 aspect: interface Concerns end-users' experience with the software 🛠 goal: fix Bug fix 🟧 priority: high Stalls work on the project or its dependents 🧱 stack: frontend Related to the Nuxt frontend

Comments

@sarayourfriend
Copy link
Contributor

Description

When I run just p frontend i18n I get the following warnings:

➜  openverse git:(fix/prevent-axios-error-sentry) just p frontend i18n
pnpm --filter frontend run i18n 

> @openverse/frontend@2.2.1 i18n /home/sara/projects/openverse/frontend
> pnpm i18n:create-locales-list && pnpm i18n:get-translations && pnpm i18n:update-locales


> @openverse/frontend@2.2.1 i18n:create-locales-list /home/sara/projects/openverse/frontend
> node src/locales/scripts/create-wp-locale-list

250 locales found in GP source code.
198 locales found in WP GP instance.
Successfully wrote locales list file to /home/sara/projects/openverse/frontend/src/locales/scripts/wp-locales.json

> @openverse/frontend@2.2.1 i18n:get-translations /home/sara/projects/openverse/frontend
> node src/locales/scripts/get-translations

Successfully saved English translation to en.json.
Performing bulk download.
Found kebab-cased key in translation strings: feat-name
Found kebab-cased key in translation strings: feat-state
Found kebab-cased key in translation strings: marked-licensed
Found kebab-cased key in translation strings: view-legal
Found kebab-cased key in translation strings: terms-copy
Found kebab-cased key in translation strings: creator-name
Found kebab-cased key in translation strings: read-more
Found kebab-cased key in translation strings: read-more
Found kebab-cased key in translation strings: feat-name
Found kebab-cased key in translation strings: feat-state
Found kebab-cased key in translation strings: link-api
Found kebab-cased key in translation strings: single-name
Found kebab-cased key in translation strings: creative-commons
Found kebab-cased key in translation strings: making-wordpress
Found kebab-cased key in translation strings: marked-licensed
Found kebab-cased key in translation strings: view-legal
Found kebab-cased key in translation strings: terms-copy
Found kebab-cased key in translation strings: creator-name
Found kebab-cased key in translation strings: link-api
Found kebab-cased key in translation strings: single-name
Found kebab-cased key in translation strings: making-wordpress
Found kebab-cased key in translation strings: marked-licensed
Found kebab-cased key in translation strings: view-legal
Found kebab-cased key in translation strings: terms-copy
Found kebab-cased key in translation strings: creator-name
Found kebab-cased key in translation strings: read-more
Found kebab-cased key in translation strings: read-more
Found kebab-cased key in translation strings: feat-name
Found kebab-cased key in translation strings: feat-state
Found kebab-cased key in translation strings: single-name
Found kebab-cased key in translation strings: marked-licensed
Found kebab-cased key in translation strings: view-legal
Found kebab-cased key in translation strings: single-name
Found kebab-cased key in translation strings: marked-licensed
Found kebab-cased key in translation strings: view-legal
Found kebab-cased key in translation strings: terms-copy
Found kebab-cased key in translation strings: creator-name
Found kebab-cased key in translation strings: read-more
Found kebab-cased key in translation strings: read-more
Found kebab-cased key in translation strings: feat-name
Found kebab-cased key in translation strings: feat-state
Found kebab-cased key in translation strings: marked-licensed
Found kebab-cased key in translation strings: view-legal
Found kebab-cased key in translation strings: terms-copy
Found kebab-cased key in translation strings: creator-name
Found kebab-cased key in translation strings: read-more
Found kebab-cased key in translation strings: read-more
Found kebab-cased key in translation strings: feat-name
Found kebab-cased key in translation strings: feat-state
Found kebab-cased key in translation strings: feat-name
Found kebab-cased key in translation strings: feat-state
Found kebab-cased key in translation strings: marked-licensed
Found kebab-cased key in translation strings: view-legal
Found kebab-cased key in translation strings: terms-copy
Found kebab-cased key in translation strings: creator-name
Found kebab-cased key in translation strings: link-api
Found kebab-cased key in translation strings: single-name
Found kebab-cased key in translation strings: creative-commons
Found kebab-cased key in translation strings: common-crawl
Found kebab-cased key in translation strings: making-wordpress
Found kebab-cased key in translation strings: feat-name
Found kebab-cased key in translation strings: feat-state
Found kebab-cased key in translation strings: marked-licensed
Found kebab-cased key in translation strings: view-legal
Found kebab-cased key in translation strings: terms-copy
Found kebab-cased key in translation strings: link-api
Found kebab-cased key in translation strings: single-name
Found kebab-cased key in translation strings: creative-commons
Found kebab-cased key in translation strings: common-crawl
Found kebab-cased key in translation strings: making-wordpress
Found kebab-cased key in translation strings: marked-licensed
Found kebab-cased key in translation strings: view-legal
Found kebab-cased key in translation strings: terms-copy
Found kebab-cased key in translation strings: creator-name
Found kebab-cased key in translation strings: creative-commons
Found kebab-cased key in translation strings: read-more
Found kebab-cased key in translation strings: read-more
Found kebab-cased key in translation strings: feat-name
Found kebab-cased key in translation strings: feat-state
Found kebab-cased key in translation strings: link-api
Found kebab-cased key in translation strings: single-name
Found kebab-cased key in translation strings: making-wordpress
Found kebab-cased key in translation strings: read-more
Found kebab-cased key in translation strings: creator-name
Found kebab-cased key in translation strings: link-api
Found kebab-cased key in translation strings: read-more
Found kebab-cased key in translation strings: read-more
Found kebab-cased key in translation strings: creative-commons
Found kebab-cased key in translation strings: marked-licensed
Found kebab-cased key in translation strings: view-legal
Found kebab-cased key in translation strings: terms-copy
Found kebab-cased key in translation strings: creator-name
Found kebab-cased key in translation strings: read-more
Found kebab-cased key in translation strings: read-more
Found kebab-cased key in translation strings: feat-name
Found kebab-cased key in translation strings: feat-state
Found kebab-cased key in translation strings: link-api
Found kebab-cased key in translation strings: single-name
Found kebab-cased key in translation strings: making-wordpress
Found kebab-cased key in translation strings: marked-licensed
Found kebab-cased key in translation strings: view-legal
Found kebab-cased key in translation strings: terms-copy
Found kebab-cased key in translation strings: creator-name
Found kebab-cased key in translation strings: creative-commons
Found kebab-cased key in translation strings: read-more
Found kebab-cased key in translation strings: read-more
Found kebab-cased key in translation strings: feat-name
Found kebab-cased key in translation strings: feat-state
Found kebab-cased key in translation strings: link-api
Found kebab-cased key in translation strings: single-name
Found kebab-cased key in translation strings: making-wordpress
Found kebab-cased key in translation strings: read-more
Found kebab-cased key in translation strings: read-more
Found kebab-cased key in translation strings: marked-licensed
Found kebab-cased key in translation strings: view-legal
Found kebab-cased key in translation strings: terms-copy
Found kebab-cased key in translation strings: creator-name
Found kebab-cased key in translation strings: creative-commons
Found kebab-cased key in translation strings: read-more
Found kebab-cased key in translation strings: read-more
Found kebab-cased key in translation strings: feat-name
Found kebab-cased key in translation strings: feat-state
Found kebab-cased key in translation strings: link-api
Found kebab-cased key in translation strings: single-name
Found kebab-cased key in translation strings: making-wordpress
Found kebab-cased key in translation strings: marked-licensed
Found kebab-cased key in translation strings: view-legal
Found kebab-cased key in translation strings: terms-copy
Found kebab-cased key in translation strings: creator-name
Found kebab-cased key in translation strings: feat-name
Found kebab-cased key in translation strings: feat-state
Found kebab-cased key in translation strings: link-api
Found kebab-cased key in translation strings: single-name
Found kebab-cased key in translation strings: read-more
Found kebab-cased key in translation strings: read-more
Found kebab-cased key in translation strings: creative-commons
Found kebab-cased key in translation strings: common-crawl
Found kebab-cased key in translation strings: making-wordpress
Found kebab-cased key in translation strings: marked-licensed
Found kebab-cased key in translation strings: view-legal
Found kebab-cased key in translation strings: terms-copy
Found kebab-cased key in translation strings: creator-name
Found kebab-cased key in translation strings: creative-commons
Found kebab-cased key in translation strings: link-api
Found kebab-cased key in translation strings: single-name
Found kebab-cased key in translation strings: making-wordpress
Successfully saved 199 translations.

@obulat is this caused by non-English translations that haven't had their keys updated? Should we reach out to the Polyglot team and see if there is a way to bulk transform existing keys to camel case so those strings get matched in our code again?

Reproduction

  1. `just p frontend i18n`
  2. See the logged warnings

Additional context

Marked as a high priority, interface frontend bug fix because I suppose these keys are not getting matched by our frontend, which now uses the camel case keys, meaning these translations are all getting unnecessarily ignored. @obulat if you think the prioritisation should be different, please feel free to change it.

@sarayourfriend sarayourfriend added 🟧 priority: high Stalls work on the project or its dependents 🛠 goal: fix Bug fix 🕹 aspect: interface Concerns end-users' experience with the software 🧱 stack: frontend Related to the Nuxt frontend labels Mar 19, 2024
@obulat
Copy link
Contributor

obulat commented Mar 21, 2024

@sarayourfriend, these warnings were added for us to watch if we still need the kebab-to-camel case replacer in the locale files: #2433 (review)
These keys are saved correctly as camelCase, and can be used by the frontend.

The PR I linked improves the warning to add locale and to also say that the kebab-cased key was converted to camelCase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🕹 aspect: interface Concerns end-users' experience with the software 🛠 goal: fix Bug fix 🟧 priority: high Stalls work on the project or its dependents 🧱 stack: frontend Related to the Nuxt frontend
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants