首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >登录页面中的ActiveAdmin translation_missing

登录页面中的ActiveAdmin translation_missing
EN

Stack Overflow用户
提问于 2018-02-22 05:34:04
回答 3查看 742关注 0票数 1

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

代码语言:javascript
复制
<span class="translation_missing" title="translation missing: en.active_admin.devise.corp_id.title">Title</span>

提前谢谢。

config/locals/en.yml

代码语言:javascript
复制
# 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"
EN

回答 3

Stack Overflow用户

发布于 2018-02-22 18:00:58

翻译在config/locales/en.yml中执行,后者覆盖ActiveAdmin提供的值

票数 0
EN

Stack Overflow用户

发布于 2018-02-23 05:44:18

你需要在你的跨度中提到翻译。试试这个:

替换如下:

代码语言:javascript
复制
<span class="translation_missing" title="translation missing: en.active_admin.devise.corp_id.title">Title</span>

使用

代码语言:javascript
复制
<span class="translation_missing" title="translation missing: en.active_admin.devise.corp_id.title"><%= t("active_admin.devise.login.title") %></span>

如果你还在面对这个问题,请告诉我。

票数 0
EN

Stack Overflow用户

发布于 2020-08-02 07:18:39

你需要改变

代码语言:javascript
复制
en:
  active_admin:
    devise:
      login:
        title: "CorpID"

代码语言:javascript
复制
en:
  active_admin:
    devise:
      corp_id:
        title: "CorpID"
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48920315

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档