ruby-i18n/i18n

[BUG] I18n.transliterate broken

laurafeier opened this issue · 1 comments

What I tried to do

  • I18n.transliterate("ț") where "ț" is defined in i18n.transliterate.rule with value of t

What I expected to happen

  • Result should be the value defined in i18n.transliterate.rule, for this example t

What actually happened

  • result is "?"

Examples

Example of working code with

  • ruby 3.1.0
  • rails 6.1.4.4,
  • i18n 1.8.11
irb(main):001:0> I18n.t("i18n.transliterate.rule.ț")
=> "t"
irb(main):002:0> I18n.transliterate("ț")
=> "t"
irb(main):003:0> I18n.t("i18n.transliterate.rule")
=> {:ș=>"s", :ț=>"t", :Ș=>"S", :Ț=>"T"}

Same example, broken behaviour, with

  • ruby 3.1.0
  • rails 6.1.4.4,
  • i18n 1.9.1
irb(main):001:0> I18n.t("i18n.transliterate.rule.ț")
=> "translation missing: en.i18n.transliterate.rule.ț"
irb(main):002:0> I18n.transliterate("ț")
=> "?"
irb(main):003:0> I18n.t("i18n.transliterate.rule")
=> {:"\xC8\x99"=>"s", :"\xC8\x9B"=>"t", :"\xC8\x98"=>"S", :"\xC8\x9A"=>"T"}

Note: This might be linked to #606

radar commented

Certainly is related! Let's keep the conversation on #606.