我正在尝试在我的一个模型中添加I18n集合。当我初始化服务器/控制台并且我调用了集合时,缺少翻译,但在重新加载应用程序或控制台后,翻译出现了。
以下是示例:
[1] pry(main)> Listing::CONDITIONS
=> [["translation missing: en.activerecord.attributes.listing.conditions.new",
"new"], ["translation missing: en.activerecord.attributes.listing.conditions.used-new",
"used-new"], ["translation missing: en.activerecord.attributes.listing.conditions.used-vgood",
"used-vgood"], ["translation missing: en.activerecord.attributes.listing.conditions.used-good",
"used-good"], ["translation missing: en.activerecord.attributes.listing.conditions.used-acceptable",
"used-acceptable"]]
[2] pry(main)> reload!
Reloading...
=> true
[3] pry(main)> Listing::CONDITIONS
=> [["New", "new"],
["Used - Like New", "used-new"],
["Used - Very Good", "used-vgood"],
["Used - Good", "used-good"],
["Used - Acceptable", "used-acceptable"]]
有什么想法吗?