nikaia / translation-sheet

Translating Laravel languages files using a Google Spreadsheet.
GNU General Public License v3.0
291 stars 60 forks source link

[Bug] changes cannot be written to local language file for locales like zh-TW #12

Closed vinsonio closed 7 years ago

vinsonio commented 7 years ago

Development environment Ubuntu 16.04 LTS Laravel Homestead 2.1.0 Laravel 5.4.x

It successfully pushed all items in zh-TW folder to Google sheet. However, It failed to write the changes after I modify the string in Google sheet.

Pulling translation from Spreadsheet
Writing languages files :
Done.

Reason This is due to the bug of getCamelizedHeader() method in translation-sheet/src/Spreadsheet.php When the locale is zh-TW or other locale with '-', the header will become zhTW. This does not match the folder name in lang folder of Laravel framework. Therefore, changes cannot be written to files in correct path.

nbourguig commented 7 years ago

Thx. Done in https://github.com/nikaia/translation-sheet/releases/tag/1.2.1