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

How to add a new language to Coral? #2628

Open
felixdro opened this issue Oct 7, 2019 · 0 comments

Comments

@felixdro
Copy link

commented Oct 7, 2019

Hi!

We are looking forward to add coral to our article pages! But we need a different language and I have some troubles adding it and need some help.

When we feel the translations are ready we would like to contribute them here to, but first I would like to get them working and test them out.

I have tried adding the language to these files and folders
/src/core/common/helpers/i18n/locales.ts (in LanguageCode and LOCALES_MAP)
coral/src/core/client/admin/test/configure/snapshots/general.spec.tsx.snap
coral/src/locales (copied the "en-US" folder to a new "sv" folder")
coral/src/core/server/locales (copied the "en-US" folder to a new "sv" folder")

But when I run npm run build I get
ERROR: /src/core/common/helpers/i18n/locales.ts:5:27 - Replace ·"en-US"·|·"pt-BR"·|·"es"·|·"de"·|·"nl-NL"·|·"da"with⏎··|·"en-US"⏎··|·"pt-BR"⏎··|·"es"⏎··|·"de"⏎··|·"nl-NL"⏎··|·"da"⏎·``

Only if i remove the lint:client from the build script I can get it to build but not sure if that's a good idea?

Suggestion

Please add a guide in the documentation how to add your own language and run it from source

Use Cases

When you need coral in a different language

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.