In my Rails project, I have translation keys with plural forms in the source language of English such as:
en:
errors:
messages:
not_saved:
one: '1 error prohibited this %{resource} from being saved:'
other: "%{count} errors prohibited this %{resource} from being saved:"
I have this string translated into Chinese (Simplified) zh_CN. Upon tx pull
, my translation file contains:
zh_CN:
errors:
messages:
not_saved:
other: "发生 %{count} 个错误,导致%{resource}保存失败:"
This causes an error on use with Rails:
ActionView::Template::Error:
translation data {:other=>"发生 %{count} 个错误,导致%{resource}保存失败:"} can not be used with :count => 1. key 'one' is missing.
What Rails is expecting here is:
zh-CN:
errors:
messages:
not_saved: "发生 %{count} 个错误,导致%{resource}保存失败:"
Is there a way to have the file in the format that Rails wants, or am I just gonna have to post-process this somehow?