将蒙古语翻译成德语 [英] Translating mongoid to german
本文介绍了将蒙古语翻译成德语的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我无法在蒙古包中转换默认验证消息.
我用
I got a problem to translate the default validation messages in mongoid.
I create a /config/initializers/mongoid.rb with
- Mongoid.add_language("de")
http://mongoid.org/docs/installation/languages.html
但是每次在经过验证的字段上调用时,我都会遇到翻译错误:
But every call on a validated field i got translation errors:
- 缺少翻译:de.mongoid.errors.models.comment.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 :
https://github.com. 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.
这篇关于将蒙古语翻译成德语的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文