amamarul / laravel-json-locations-manager

This is a package to manage json strings for the new Laravel 5.4 Localization Translation Strings As Keys.
MIT License
11 stars 1 forks source link

Importing existing array strings issues #3

Open Mopster opened 7 years ago

Mopster commented 7 years ago

I have some issues with importing already existing translations from arrays.

There are 2 languages, EN and JA and they each have 5 files with translations (auth.php, error.php, messages.php, ...). When importing them, they get added to the sqlite as 'langen' and 'langja' columns. Publishing these json's will also fail on the 'lang/lang/en.json'.

The Japanese translations are also not imported well. They get imported as separate new key's instead of matching on the already imported English keys. This is probably because the actual English translations are used a keys instead of the array keys.

amamarul commented 7 years ago

Hello! I will check this, that happends only in the new lang?

amamarul commented 7 years ago

I don´t have this problem, could you send me some screenshot? You are using Laravel 5.4?

Mopster commented 7 years ago

Yes, using Laravel 5.4. Here are the screenshots :

Situation before install : before_files English translation array file : array_lang_en Japanese translation array file array_lang_ja

Running the install command :

console_error

Generated the following table :

tables

With following data :

db_translation

amamarul commented 7 years ago

Hello! That is very strange, in first place because the package don't export to json the lang 'en' and i don´t understand because is searching a second lang forlder. Yesterday because of yours issues i made some changes, then i will to upload them and you can test again and tell me your sugestions. really i tested all of that and i don´t have that error. Thanks for all yours comments