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

Translation/lang isn't working #544

Closed
Freezlex opened this issue Jun 11, 2020 · 6 comments
Closed

Translation/lang isn't working #544

Freezlex opened this issue Jun 11, 2020 · 6 comments

Comments

@Freezlex
Copy link
Contributor

I don't know if it's already marked-up but when I try to make a translated application with the .json file it's not working like it stay with the clear-feature-tip for example but it stay the same for all.
So I think you know about this but I still wanna know if i'm doing it wrong or not 😅
My fr.json is over here carine\src\gm3\lang\fr.json (from the HTDOCS file)
And in my app.js i've added this on the app declaration :

lang: {
        en: './en.json',
        fr: './fr.json' //i've tryied with many file path x)
    }
@Freezlex
Copy link
Contributor Author

Ok after some tryies i've noticed than when I put my new lang into the carine\src\gm3\i18n.js file it works fine, but when I put it into the app.js it didn't works with the right syntaxes

@theduckylittle
Copy link
Member

theduckylittle commented Jun 11, 2020 via email

@Freezlex
Copy link
Contributor Author

Freezlex commented Jun 11, 2020

Huuuuum okay that was so obvious 😅
So we cannot link it to another location ? like i've tried to put something like ..\geomoose\src\gm3\lang\fr.json annnnd ... nothing

@klassenjs
Copy link
Member

Putting it in /src/gm3/lang is correct for adding the language officially. Did you update i18n.js and rebuild GeoMoose?

The reason the add-a-language recommendation is to put custom translation files next to app.js is so it doesn't get overwritten or conflict when GeoMoose is updated.

@Freezlex
Copy link
Contributor Author

Yeah when I put it directly in the i18n.js it works perfectly, this is when I try to add it into the app.js and locate the file into ..\geomoose\src\gm3\lang\fr.json that it doesn't works ... But anyway you solved my both issues thanks a lot 👍

Putting it in /src/gm3/lang is correct for adding the language officially. Did you update i18n.js and rebuild GeoMoose?

The reason the add-a-language recommendation is to put custom translation files next to app.js is so it doesn't get overwritten or conflict when GeoMoose is updated.

@elil
Copy link
Member

elil commented Dec 12, 2020

I don't know if it's already marked-up but when I try to make a translated application with the .json file it's not working like it stay with the clear-feature-tip for example but it stay the same for all.
So I think you know about this but I still wanna know if i'm doing it wrong or not 😅
My fr.json is over here carine\src\gm3\lang\fr.json (from the HTDOCS file)
And in my app.js i've added this on the app declaration :

lang: {
        en: './en.json',
        fr: './fr.json' //i've tryied with many file path x)
    }

Hi @Freezlex, I'm a little late on this but would you be willing to contribute your fr.json translation to the GeoMoose project? If so, can you attach the file in a new issue or here (or perhaps a .zip of it) and can you confirm that you are contributing this under the license here, https://github.com/geomoose/gm3/blob/master/AUTHORS?

PRs also welcome here, https://github.com/geomoose/gm3/tree/master/src/gm3/lang and add your self to the Translators section of the Authors file https://github.com/geomoose/gm3/blob/master/AUTHORS in the PR.

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

No branches or pull requests

4 participants