本文介绍了将蒙古语翻译成德语的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我无法在蒙古包中转换默认验证消息. 我用
I got a problem to translate the default validation messages in mongoid. I create a /config/initializers/mongoid.rb with
- Mongoid.add_language("de")
mongoid/docs/installation/languages.html
但是每次在经过验证的字段上调用时,我都会遇到翻译错误:
But every call on a validated field i got translation errors:
- 缺少翻译:de.mongoid.errors.modelsment.attributes.body.too_short
- 缺少翻译:de.mongoid.errors.models.user.attributes.username.blank
我有
- 在Rails 3.2上使用规则
- Ruby 1.9.3
- 蒙古语2.4.7
如果检查Mongoid源,则可以看到这两个键的de.yml语言环境文件没有翻译:
If you check on Mongoid source, the de.yml locale file you can see this two key are not translate :
github. com/mongoid/mongoid/blob/2.4.0-stable/lib/config/locales/de.yml
您可以在Mongoid 2.4.0稳定分支上执行一些pull_request来添加它.
You can do some pull_request on Mongoid 2.4.0-stable branch to add it.
更多推荐
将蒙古语翻译成德语
发布评论