themsaid / laravel-langman

Language files manager in your artisan console.
MIT License
876 stars 166 forks source link

Double quotes get slash #45

Closed swedishzorro closed 8 years ago

swedishzorro commented 8 years ago

Steps to reproduce:

  1. Create new label and enter text Hello "zorro": php artisan langman:trans labels.bye
  2. Now check the lang file and see that the double quotes have slashes, this is the output: <?php return array ( 'hello' => 'Hello \"zorro\"' );

Seems it's the addslashes in the Manager that causes this, possibly try to use var_export instead of stringLineMaker() function? This is what the Manager.php's writeFile function could look like: `

public function writeFile($filePath, array $translations)
{
    $content = "<?php \n\nreturn ".  var_export($translations, TRUE).';';
    file_put_contents($filePath, $content);
}

`