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

Several missing translations since release v4.4.41 #12429

Closed
filipefurtad0 opened this issue May 1, 2024 · 5 comments
Closed

Several missing translations since release v4.4.41 #12429

filipefurtad0 opened this issue May 1, 2024 · 5 comments
Assignees
Labels
bug-s2 The bug is affecting any of the non-critical features described in S1 and there is no workaround. regression Tagging any identified regressions

Comments

@filipefurtad0
Copy link
Contributor

filipefurtad0 commented May 1, 2024

Description

Introduced on v4.4.41.

We're seeing a missing JS translation in production:

remaining_in_stock: "Only %{quantity} left"

Edit:

we're also seeing that

spree.admin.orders.index.selected

is missing.

admin.order_cycles.status.open

Expected Behavior

Remaining stock in the shopfront should be translated.

Actual Behaviour

Remaining stock in the shopfront is not translated.

Steps to Reproduce

This seems to be reproducible for non-default locales, like en_US.yml, or en_AU.yml; it does not seem to occur for en.yml, or fr.yml.

As admin:

  1. Visit the Dashboard and the Shop preferences tab: enable the "Display remaining stock in shopfront if low on-hand"
  2. For a given product on the order cycle, set the on hand stock to 2 units.

As a customer:
3. Visit the shopfron set-up in the previous steps
4. Notice the missing translation

As admin:

  1. Visit the orders page. Notice the missing translation next to the actions menu.

As admin:

  1. Visit the orders page.
  2. Create an order
  3. Click the dropdown to select an order cycle; notice the missing translation

Animated Gif/Screenshot

image

image

image

Workaround

Severity

bug-s3: a feature is broken but there is a workaround

Your Environment

  • Version used: v4.4.41
  • Browser name and version: Firefox 125.0.3
  • Operating System and version (desktop or mobile): Ubuntu 22.04

Possible Fix

@filipefurtad0 filipefurtad0 added bug-s3 The bug is stopping a critical or non-critical feature but there is a usable workaround. regression Tagging any identified regressions labels May 1, 2024
@RachL
Copy link
Contributor

RachL commented May 2, 2024

As this is shopfront facing, I'm bumping it as s2 👍

@RachL RachL added bug-s2 The bug is affecting any of the non-critical features described in S1 and there is no workaround. and removed bug-s3 The bug is stopping a critical or non-critical feature but there is a usable workaround. labels May 2, 2024
@filipefurtad0 filipefurtad0 changed the title Missing translation: Can't find variable: I18n [Missing translation] -> remaining_in_stock: "Only %{quantity} left" May 2, 2024
@filipefurtad0
Copy link
Contributor Author

I've edited the title because initially I was convinced this was related to these Bugsnag errors, happening at least since 6 Apr on CA, 5 Apr on UK.

These point to moment.js and the locales as well... However, staging the latest versions showed that this bug is occurring only since v4.4.41.

@filipefurtad0 filipefurtad0 changed the title [Missing translation] -> remaining_in_stock: "Only %{quantity} left" Several missing translations since release v4.4.41 May 2, 2024
@sigmundpetersen
Copy link
Contributor

These keys are untranslated for en_AU and en_US.

Maybe #12392 did something with the language fallback solution?

@mkllnk mkllnk self-assigned this May 3, 2024
@mkllnk
Copy link
Member

mkllnk commented May 3, 2024

I remember now that the JS part of translations loads only the "available locales", not all locales to save on the JS bundle size. So without the source in there, it can't find the fallback translations.

@mkllnk
Copy link
Member

mkllnk commented May 3, 2024

I confirmed on au-staging that it's fixed through the revert.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-s2 The bug is affecting any of the non-critical features described in S1 and there is no workaround. regression Tagging any identified regressions
Projects
Status: Done
Development

No branches or pull requests

4 participants