在有效管理员中,我使用corp_id
代替email
Admin User
来登录其帐户。但是在登录页面中,我得到的标签名称不正确Title
而不是corp_id
。我尝试使用CSS更改该标签,但它对我不起作用。如何将Title
的标签名称更改为Corp-ID
如果我错了,请告诉我。
<span class="translation_missing" title="translation missing: en.active_admin.devise.corp_id.title">Title</span>
提前致谢。
配置/当地人/ en.yml
# Files in the config/locales directory are used for internationalization
# and are automatically loaded by Rails. If you want to use locales other
# than English, add the necessary files in this directory.
#
# To use the locales, use `I18n.t`:
#
# I18n.t 'hello'
#
# In views, this is aliased to just `t`:
#
# <%= t('hello') %>
#
# To use a different locale, set it with `I18n.locale`:
#
# I18n.locale = :es
#
# This would use the information in config/locales/es.yml.
#
# The following keys must be escaped otherwise they will not be retrieved by
# the default I18n backend:
#
# true, false, on, off, yes, no
#
# Instead, surround them with single quotes.
#
# en:
# 'true': 'foo'
#
# To learn more, please read the Rails Internationalization guide
# available at http://guides.rubyonrails.org/i18n.html.
en:
active_admin:
devise:
login:
title: "CorpID"
答案 0 :(得分:0)
翻译在config / locales / en.yml中执行,覆盖values provided by ActiveAdmin。
答案 1 :(得分:0)
您需要在您的范围内提及翻译。试试这个:
替换以下内容:
<span class="translation_missing" title="translation missing: en.active_admin.devise.corp_id.title">Title</span>
与
<span class="translation_missing" title="translation missing: en.active_admin.devise.corp_id.title"><%= t("active_admin.devise.login.title") %></span>
如果你仍然面临这个问题,请告诉我。
答案 2 :(得分:0)
您需要更改
en:
active_admin:
devise:
login:
title: "CorpID"
要
en:
active_admin:
devise:
corp_id:
title: "CorpID"