Rails: 翻译缺失错误
Rails: translation missing error
我正在尝试在 rails 上学习 ruby。在进行国际化时,出现错误:
translation missing: en.store.index.title_html
下面是我的en.yml
文件
en:
layouts:
application:
title: "Pragmatic book shelf"
home: "Home"
questions: "Questions"
news: "News"
contact: "Contact"
store:
index:
title_html: "Your Pragmatic Catalog"
add_html: "Add to Cart"
我已经搜索了解决方案,它说 en.yml 文件中只允许有空格。它已经写成只有空格。任何帮助将不胜感激。
您必须在索引键下添加正确的缩进。
en:
store:
index:
title_html: "Your Pragmatic Catalog"
add_html: "Add to Cart"
要使用您当前的代码访问 title_html
,它将在存储之后立即执行,就像您使用 index
一样(同一个 store
键下的三个键):
en.store.title_html
我正在尝试在 rails 上学习 ruby。在进行国际化时,出现错误:
translation missing: en.store.index.title_html
下面是我的en.yml
文件
en:
layouts:
application:
title: "Pragmatic book shelf"
home: "Home"
questions: "Questions"
news: "News"
contact: "Contact"
store:
index:
title_html: "Your Pragmatic Catalog"
add_html: "Add to Cart"
我已经搜索了解决方案,它说 en.yml 文件中只允许有空格。它已经写成只有空格。任何帮助将不胜感激。
您必须在索引键下添加正确的缩进。
en:
store:
index:
title_html: "Your Pragmatic Catalog"
add_html: "Add to Cart"
要使用您当前的代码访问 title_html
,它将在存储之后立即执行,就像您使用 index
一样(同一个 store
键下的三个键):
en.store.title_html