-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
i18n round 2 #974
i18n round 2 #974
Conversation
Deploy preview for netlify-cms-www ready! Built with commit 1ceff1c |
Deploy preview for cms-demo ready! Built with commit 1ceff1c |
#403 (comment) mentions "expose i18n to widget authors, so that they can provide an object of translation objects with the widget". IMHO this could be added later. The core needs to be i18n-ed IMHO asap. |
Hi, when I run if (file === enFile || file === 'index.js') {
return
} @vencax could u tell me how I should extract strings? |
@derevandal this was undone, thank for pointing at it. See the last commit for details. Cheers! |
@vencax your code didn't work here. const LangParam = process.argv[2];
if (LangParam) {
const filePath = path.join(i18nFolder, `${ LangParam }.json`);
const translations = {};
keys.map(i => translations[i.key] = i.key);
writeTranslations(filePath, translations);
} and it works. |
@vencax could u tell me how do i change lang of cms by extracted lang? |
@derevandal |
@vencax when i used |
why don't u use pt-br.json
|
@derevandal did you ever get this working? @vencax I do want to get this in, just wanted at least one more person to review, especially someone that has a translation use case. That said, I think the only real blockers are:
This change has a big impact on the codebase, as the translation function is in almost every UI file, so I want to make sure it's maintainable. Thanks again for your work on this! |
@erquhart nope. nor was I able to extract or use the extracted file manually. |
Closing as stale. |
Hi, this is continuation of #403. I have made another PR because the I was not sucessfull with rebase. This could be easier to merge IMHO.
Cheers, and happy New Year!