Hi @mruoss,
I have a problem with importing translations.
I run import with file:
key,pltest.test_meessage_1,"Message 1"
The file is properly imported and inserting content to resources/lang/pl/test.php
Then I run import with file:
key,pltest.test_meessage_2,"Message 2"
After that I've got only content of the second import file in resources/lang/pl/test.php.
Translations which exists in this file are deleted.
I don't know if this is the expected behavior, but I found that the problem is in ImportFromCsvCommand.php
In the line 116 there is Arr::set($translations, $key, $value[$locale]);
This creates undoted keys in doted array $translations. After that the content of translations is:
array:2 ["test.test_meessage_1" => "Message 1""test" => array:1 ["test_meessage_2" => "Message 2"]]
That's why when the content is saved, only the second translation exists.
Hi @mruoss, I have a problem with importing translations. I run import with file:
key,pl
test.test_meessage_1,"Message 1"
The file is properly imported and inserting content to resources/lang/pl/test.php
Then I run import with file:
key,pl
test.test_meessage_2,"Message 2"
After that I've got only content of the second import file in resources/lang/pl/test.php. Translations which exists in this file are deleted.I don't know if this is the expected behavior, but I found that the problem is in ImportFromCsvCommand.php In the line 116 there is
Arr::set($translations, $key, $value[$locale]);
This creates undoted keys in doted array $translations. After that the content of translations is:
array:2 [
"test.test_meessage_1" => "Message 1"
"test" => array:1 [
"test_meessage_2" => "Message 2"
]
]
That's why when the content is saved, only the second translation exists.
Can I create pull request to change that?
Thank you