Defect #8847

I18n YAML files not parsable with psych yaml library

Added by Etienne Massip about 6 years ago. Updated almost 5 years ago.

Status:ClosedStart date:2011-07-19
Priority:NormalDue date:
Assignee:Toshi MARUYAMA% Done:

0%

Category:Ruby support
Target version:-
Resolution:Fixed Affected version:

Description

Follows #8209.

This scriptlet returned new errors :

require 'psych'

parser = Psych::Parser.new

Dir.entries('config/locales').each do |filename|

  next if File.directory? filename

  puts "parsing #{filename}..." 
  parser.parse File.open('config/locales/' + filename)
end

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).

locales_YAML_parsing_errors_fix.patch Magnifier (5.16 KB) Etienne Massip, 2011-07-19 15:02


Related issues

Related to Redmine - Feature #8209: I18n YAML files not parsable with psych yaml library Closed 2011-04-22
Related to Redmine - Feature #4050: Ruby 1.9 support Closed 2009-10-18

Associated revisions

Revision 6462
Added by Toshi MARUYAMA almost 6 years ago

Ruby 1.9: force use syck yaml library (#8847, #4050).

Revision 6643
Added by Toshi MARUYAMA almost 6 years ago

Ruby 1.9: fix parsing error en.yml with psych yaml library (#8847).

Revision 6644
Added by Toshi MARUYAMA almost 6 years ago

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.

Revision 6647
Added by Toshi MARUYAMA almost 6 years ago

Ruby 1.9: add rake task to check parsing yaml by psych library (#8847, #4050).

Original code is written by Etienne Massip.

Revision 6649
Added by Toshi MARUYAMA almost 6 years ago

Ruby 1.9: fix typo of rake task name to check parsing yaml by psych library (#8847, #4050).

Revision 6650
Added by Toshi MARUYAMA almost 6 years ago

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.

Revision 6687
Added by Toshi MARUYAMA almost 6 years ago

Ruby 1.9: fix parsing error of hu.yml with psych yaml library (#8847).

Revision 6689
Added by Toshi MARUYAMA almost 6 years ago

Ruby 1.9: fix parsing error of ja.yml with psych yaml library (#8847).

Contributed by Etienne Massip.

Revision 6698
Added by Toshi MARUYAMA almost 6 years ago

Ruby 1.9: fix parsing error of zh.yml with psych yaml library (#8847).

Contributed by Etienne Massip.

Revision 6700
Added by Toshi MARUYAMA almost 6 years ago

Ruby 1.9: fix parsing error of zh.yml with psych yaml library (#8847).

Revision 7794
Added by Toshi MARUYAMA over 5 years ago

Ruby 1.9: fix parsing error of sl.yml with psych yaml library (#8847)

History

#1 Updated by Toshi MARUYAMA about 6 years ago

I have known this problem.
https://www.chiliproject.org/issues/503

Should we change all i18n yaml?

#2 Updated by Etienne Massip about 6 years ago

What do you mean by "all i18n yaml" ?

#3 Updated by Etienne Massip about 6 years ago

All the changes included in the patch are necessary, if this is your question ?

#4 Updated by Toshi MARUYAMA about 6 years 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 about 6 years ago

  • File deleted (locales_YAML_parsing_errors_fix.patch)

#6 Updated by Etienne Massip about 6 years ago

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 about 6 years ago

I don't know why they missed the other files...

#8 Updated by Etienne Massip almost 5 years ago

  • Status changed from New to Closed
  • Target version deleted (Candidate for next minor release)
  • Resolution set to Fixed

Also available in: Atom PDF