nikaia / translation-sheet

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

Update Writer.php #30

Closed alexandrutabolcea closed 5 years ago

alexandrutabolcea commented 5 years ago

Consider replacing empty with !isset || strlen == 0

there is a bug when translation value is "0"

if (empty($translation[$locale])) { continue; }

            if (!isset($translation[$locale]) || strlen($translation[$locale]) == 0) {
                continue;
            }
nbourguig commented 5 years ago

I just went a head and replace empty() by isset() only. I had some cases where I need to keep a translation empty.