BRACKETS-by-TRIAD / craftable

Admin panel builder / CRUD generator for Laravel.
https://getcraftable.com
MIT License
984 stars 191 forks source link

Provide translations also to the JavaScript #167

Open SelimTavukcuoglu opened 4 years ago

SelimTavukcuoglu commented 4 years ago

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 commented 4 years ago

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

SelimTavukcuoglu commented 4 years ago

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 commented 4 years ago

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 ?

roolian commented 3 years ago

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 commented 3 years ago

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

bagabool commented 3 years ago

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

vendor > brackets > admin-ui > resources > lang