Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Uncaught InvalidArgumentException) language file error on install (Finnish). #4247

Closed
mediaclinic opened this issue Jun 2, 2015 · 5 comments

Comments

@mediaclinic
Copy link

Upgrading Silverstripe to 3.1.13 gave error on YAML language line "Help2:". It differs from English one with \n\t when in original has only \n. And site is in Finnish. Fixed it by removing \t characters and additional spaces before last div in the YAML translation file (line: 261 on the fi.yml-file)

Error: "[User Error] Uncaught InvalidArgumentException: Unable to parse string: Malformed inline YAML string ("\n\tEdistynyt käyttö\n\t\n\tSallitut palstat: %s\n\tOlemassa olevat ryhmät kohdistetaan niiden uniikin Code arvolla, ja päivitetään uudet arvot tuodusta tiedostosta\n\tOikeustasot voidaan luoda käyttämällä ParentCode palstaa.\n\tOikeustasokoodit voidaan kohdistaa PermissionCode palstassa. Olemassaolevia oikeusia ei tyhjennetä.\n\t\n)."

Source:

92 $yaml = new sfYamlParser();
93
94 try
95 {
96 $ret = $yaml->parse($input);
97 }
98 catch (Exception $e)
99 {
100 throw new InvalidArgumentException(sprintf('Unable to parse %s: %s', $file ? sprintf('file "%s"', $file) : 'string', $e->getMessage()));
101 }
102
103 return $ret;
104 }
105
106 /**

@elvinas-liut
Copy link
Contributor

I've got the same message in Lithuanian:

[User Error] Uncaught InvalidArgumentException: Unable to parse string: Malformed inline YAML string ('Iškilo techninė problema. Prašome paspausti mygtuką Atgal,).

Translate_Adapter_RailsYaml->_loadTranslationData(/var/www/vhost/test9803.unisolutions.eu/httpdocs/framework/lang/lt.yml,lt,Array)
Adapter.php:646

Line 194 in lt.yml

Please fix it ASAP! 3.1.13 version is unusable now!

@dhensby
Copy link
Contributor

dhensby commented Jun 12, 2015

I've been able to replicate this.

@tractorcow / @chillu - I'm not certain how we go about updating the translations as they come from transifex :S

@tractorcow
Copy link
Contributor

@elvinas-liut
Copy link
Contributor

Yes, it's OK now.

@tractorcow
Copy link
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants