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

Provide translations also to the JavaScript #167

Open
SelimTavukcuoglu opened this issue Nov 21, 2019 · 6 comments
Open

Provide translations also to the JavaScript #167

SelimTavukcuoglu opened this issue Nov 21, 2019 · 6 comments

Comments

@SelimTavukcuoglu
Copy link

Hello !

Thx for your amazing work on Craftable.

I like the way it works and how it is customizable.

But, I'm french and I need to use Craftable in French. The translations related to the blade views work. But the error messages (for instances) displayed by Javascript are not translated (still English).

Am I missing something or this translation "side" doesn't work ?

Thx again for your work !

@palypster
Copy link
Contributor

Merci! Can you be more specific what messages? Give couple of examples please.

@SelimTavukcuoglu
Copy link
Author

Here is a screenshot of a Edition page. Labels and all are translated in french. But the notification and the error messages are still in English.

image

@SelimTavukcuoglu
Copy link
Author

Ok I found out : I had to define a locale to VeeValidate (for the fields)

It seems that Craftable is not yet totally easily-translatable, is it ?

@palypster palypster changed the title Are translations only available server side ? Provide translations also to the JavaScript Jan 19, 2020
@roolian
Copy link

roolian commented Nov 30, 2020

Hi.
In ressources/js/admin/admin.js

Change :
//import VeeValidate from "vee-validate";
import VeeValidate, { Validator } from 'vee-validate';
import veeFR from "vee-validate/dist/locale/fr";

Add :
Validator.localize('fr', veeFR);

@Skynalter21
Copy link

Even translating these messages do not change, how can I change them?
image

@bagabool
Copy link

Even translating these messages do not change, how can I change them?
image

vendor > brackets > admin-ui > resources > lang

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

No branches or pull requests

5 participants