views/devise/sessions/new.开发者_如何学JAVAhtml.haml
%h2
= t('devise.sessions.link')
devise can't find the translation
<span class="translation_missing" title="translation missing: ru.devise.sessions.link">Link</span>
but
ru:
devise:
sessions:
link: 'Войти'
is present in config/locales/devise.ru.yml
Rails merges the parsed yaml files correctly but, when a key is used twice within the same translation file, one of them will be replaced by the other, the same way it would when adding an existing key value pair to a manually created hash.
example yaml file:
----
:foo: bar
:foo: foo
example code use:
require 'rubygems'
require 'yaml'
YAML::load("--- \n:foo: :bar\n:foo: :foo\n")
output:
=> {:foo=>:foo}
精彩评论