martinlindhe / laravel-vue-i18n-generator

Generates a vue-i18n compatible include file from your Laravel translations
MIT License
306 stars 207 forks source link

Make generateMultiple and allocateLocaleArray deterministic #105

Closed Jellyfrog closed 4 years ago

Jellyfrog commented 4 years ago

Currently it outputs files and folders in an nondeterministic way. Just copies the sorting from generateFromPath()

Machine 1:

.
..
fr
ru.json
ru
uk.json
uk
zh-TW
de.json
de
fr.json
zh-TW.json
en

Machine 2:

.
..
ru
fr
de
uk.json
zh-TW
uk
ru.json
fr.json
en
de.json
zh-TW.json
martinlindhe commented 4 years ago

Nice! Could you please rebase this patch to master branch so we can merge it?

Jellyfrog commented 4 years ago

Ping @martinlindhe done.

martinlindhe commented 4 years ago

Thanks!

martinlindhe commented 4 years ago

@Jellyfrog this PR breaks existing behaviour, please see #108 Feel free to resolve. In the meantime we will revert this PR.

kapalla commented 4 years ago

I honestly don't understand the problem of #108

(new SplFileInfo($fileinfo))->getFilename() resolves now the symlink and returns lang instead of core and user when calling $fileinfo->getFilename() directly.