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

JS translations don't seem to get exposed. #85

Closed
s-kerdel opened this issue Feb 9, 2022 · 6 comments
Closed

JS translations don't seem to get exposed. #85

s-kerdel opened this issue Feb 9, 2022 · 6 comments
Assignees
Labels
impact/high type/bug Something isn't working

Comments

@s-kerdel
Copy link

s-kerdel commented Feb 9, 2022

Hello,

I am unable to use the TOTP module using dutch translations (nl).
I have the idea the JS lang files aren't exposed / are not detected correctly by the bundle file.
When I add the translations to the MFA module, the translations are detected and visible.

I wonder if the path of the lang files is correct (they say that Translation Tables should be automatically detected).
Maybe something from https://docs.silverstripe.org/en/4/developer_guides/i18n/ might clear things up.

Could you please look into this?
The SS installation is version 4.9.

Acceptance criteria

  • Login screen and all MFA screen can be translated and the translation show.
  • MFA registration screen in CMS display translation when available

PRs

@emteknetnz emteknetnz added impact/high type/bug Something isn't working labels Feb 18, 2022
@maxime-rainville
Copy link

I had a look at the underlying Dutch translations. The vast majority of the strings in these screenshots have bee translated and should be showing in Dutch ... but they are not.

image

image

image

@RickButer
Copy link

I am also having the same issue.
Seems like the translations in de TOTP module are not shown.

@GuySartorelli GuySartorelli self-assigned this Jun 12, 2023
@GuySartorelli
Copy link
Member

There are a couple of problems at play here.

The first and biggest is that nl is not a valid locale setting to use. i18n is supposed to take 2-character locales and find the appropriate correct-formatted locale for it, but it seems to be failing to do so. The workaround for this is to use nl_NL as your locale, but I'll see what I can do about fixing i18n. Worst case I'll do some documentation to make this clearer.

The second is that some (not many) of the translation strings expected by the js aren't available in the client/lang dir and therefore are never translated. That's a much more minor issue, ultimately, but one that is easy to resolve so I'll resolve it.

@emteknetnz
Copy link
Member

@GuySartorelli You've used a POC branch to extract more of the js translations - could you create a new issue for that one explaining the issue and put the POC PR there? As well as the unmerged "MNT Add missing translation strings to js src lang". I'm a bit confused as to why some but not all of the JS translations weren't picked up, I'm not sure if it's restricted to mfa modules or if it's more widespread

@GuySartorelli
Copy link
Member

New issue created: silverstripe/silverstripe-framework#10814

@GuySartorelli
Copy link
Member

All PRs have been merged and there's no further work to be done. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact/high type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants