Defect #8847
I18n YAML files not parsable with psych yaml library
| Status: | New | Start date: | 2011-07-19 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | Toshi MARUYAMA | % Done: | 0% |
|
| Category: | Ruby interpreter support | |||
| Target version: | Candidate for next minor release | |||
| Affected version: | Resolution: |
Description
Follows #8209.
This scriptlet returned new errors :
1require 'psych'
2
3parser = Psych::Parser.new
4
5Dir.entries('config/locales').each do |filename|
6
7 next if File.directory? filename
8
9 puts "parsing #{filename}..."
10 parser.parse File.open('config/locales/' + filename)
11end
Patch attached based on your redmine-31 bitbucket mirror; beware, the updates on ja, zh and zh-TW locales are made "blindly" (don't have the according fonts installed).
Related issues
Associated revisions
Ruby 1.9: fix parsing error en.yml with psych yaml library (#8847).
Ruby 1.9: fix parsing error fr.yml with psych yaml library (#8847).
It seems that double quote and escape is need for non ASCII and backslash
on ruby 1.9.2p290 (2011-07-09 revision 32553) [i686-linux].
Contributed by Etienne Massip.
Ruby 1.9: fix parsing error of pt-BR.yml with psych yaml library (#8847).
It seems that double quote and escape is need for non ASCII and backslash
on ruby 1.9.2p290 (2011-07-09 revision 32553) [i686-linux].
Contributed by Etienne Massip.
Ruby 1.9: fix parsing error of hu.yml with psych yaml library (#8847).
Ruby 1.9: fix parsing error of ja.yml with psych yaml library (#8847).
Contributed by Etienne Massip.
Ruby 1.9: fix parsing error of zh.yml with psych yaml library (#8847).
Contributed by Etienne Massip.
Ruby 1.9: fix parsing error of zh.yml with psych yaml library (#8847).
Ruby 1.9: fix parsing error of sl.yml with psych yaml library (#8847)
History
#1 Updated by Toshi MARUYAMA 10 months ago
I have known this problem.
https://www.chiliproject.org/issues/503
Should we change all i18n yaml?
#2 Updated by Etienne Massip 10 months ago
What do you mean by "all i18n yaml" ?
#3 Updated by Etienne Massip 10 months ago
All the changes included in the patch are necessary, if this is your question ?
#4 Updated by Toshi MARUYAMA 10 months ago
Chiliproject replaced '\' to '\\' in only en.yml and pt-BR.yml.
https://www.chiliproject.org/projects/chiliproject/repository/revisions/f41dac1b6b593890c8a6fde2b72d87c5c51fd321
Should we change all *.yml at source:trunk/config/locales ?
#5 Updated by Etienne Massip 10 months ago
- File deleted (
locales_YAML_parsing_errors_fix.patch)
#6 Updated by Etienne Massip 10 months ago
- File locales_YAML_parsing_errors_fix.patch added
Yes, that is : en, fr, ja, pt-BR, zh and zh-TW.
Was a glitch in my previous patch, here's a patch based on trunk.
#7 Updated by Etienne Massip 10 months ago
I don't know why they missed the other files...
