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

Fix Swedish - #874 and #875 #876

Merged
merged 4 commits into from
Jan 1, 2023
Merged

Fix Swedish - #874 and #875 #876

merged 4 commits into from
Jan 1, 2023

Conversation

proddy
Copy link
Contributor

@proddy proddy commented Jan 1, 2023

No description provided.

@proddy proddy requested a review from MichaelDvP January 1, 2023 15:51
Copy link
Contributor

@MichaelDvP MichaelDvP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks all ok, but i doubt that this fixes #874.
If this was the cause all plurals should wrongin SE, but all plurals working for SE, except days. Also many days are working for SE, only for 2, few it's wrong.
Now look at the plural declaration in PL and find the difference between days and all other num declarations.

@proddy
Copy link
Contributor Author

proddy commented Jan 1, 2023

Looks all ok, but i doubt that this fixes #874. If this was the cause all plurals should wrongin SE, but all plurals working for SE, except days. Also many days are working for SE, only for 2, few it's wrong. Now look at the plural declaration in PL and find the difference between days and all other num declarations.

The plurals are handled by the Intl JS library base do rules per locale, which typescript-i18n used. When it was SE it was using the Sami language. I'm not sure why it worked in the dashboard and not in the status. It's also not just NUM_DAYS but also NUM_MINUTES and the others too.

@proddy
Copy link
Contributor Author

proddy commented Jan 1, 2023

For PL it's weird how it's implemented and I think incorrectly. I found out that numeric plurals in Polish are tricky (see https://www.quora.com/How-do-Polish-plurals-work) but the library should handle this and not be implemented the way it is now.

@proddy proddy merged commit d2e6446 into emsesp:dev Jan 1, 2023
@MichaelDvP
Copy link
Contributor

When it was SE it was using the Sami language. I'm not sure why it worked in the dashboard and not in the status. It's also not just NUM_DAYS but also NUM_MINUTES and the others too.

Very strange, i did not see issues for the plurals when switching language. But plural rules for se and sv are identical. See http://docs.translatehouse.org/projects/localization-guide/en/latest/l10n/pluralforms.html

I also don't know what have caused it and did not see it in dashboard for any wrong plural (including days) and in status minutes and seconds were ok for all languages (including SE), i thought it's just days, let's wait 2 days if it is fixed.

@proddy
Copy link
Contributor Author

proddy commented Jan 2, 2023

I hope it's fixed but we'll see. I quick test I did was

  • add **{LL.NUM_MINUTES({num: 2})}** to the bottom of SignIn.tsx
  • Make the PL translation the same as EN in i18n/pl/index.ts just to rule out the base translation messing the formatting up
  • npm run standalone and click on the flags and see how the number is rendered
  • it didn't work for Swedish when it was set to se

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants