在active admin中,我使用corp_id而不是email来为Admin User登录帐户。但是在登录页面中,我得到了不正确的标签名,因为Title而不是corp_id.I试图使用CSS更改标签,但它对我不起作用。如何将Title的标签名改为Corp-ID,如果我错了,请告诉我。

<span class="translation_missing" title="translation missing: en.active_admin.devise.corp_id.title">Title</span>提前谢谢。
config/locals/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"发布于 2018-02-22 18:00:58
翻译在config/locales/en.yml中执行,后者覆盖ActiveAdmin提供的值。
发布于 2018-02-23 05:44:18
你需要在你的跨度中提到翻译。试试这个:
替换如下:
<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>如果你还在面对这个问题,请告诉我。
发布于 2020-08-02 07:18:39
你需要改变
en:
active_admin:
devise:
login:
title: "CorpID"到
en:
active_admin:
devise:
corp_id:
title: "CorpID"https://stackoverflow.com/questions/48920315
复制相似问题