gpt4 book ai didi

ruby-on-rails - rails 翻译丢失错误

转载 作者:行者123 更新时间:2023-12-04 06:31:41 24 4
gpt4 key购买 nike

我已经在我的 Controller 中设置了闪现信息

flash[:error] = t 'auth.login.empty'

我的 en.yml 文件有

en:
auth:
login:
success: "Successfully logged in"
empty: "Empty field cannot accespted"
error: "Username and password doesn't match"

都是两个空格缩进

由于翻译缺失:en.auth.login.empty

我是否必须进行一些配置更改。

最佳答案

我刚遇到这个。

我在文件顶部设置的 key 稍后在文件中被覆盖:

# This was showing up as missing
invite:
intent_msg: "Test intent message."

# because waaaay farther down the file I had the following:

invite:
button_text: "<i class='fi-mail'></i> Send Invite"

尽管这两个翻译是针对不同的键,但第二个翻译杀死了第一个。

所以现在我有这个:

invite:
intent_msg: "Test intent message."
button_text: "<i class='fi-mail'></i> Send Invite"

一切又都好了。小心那个人。

关于ruby-on-rails - rails 翻译丢失错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19107694/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com