Giter Site home page Giter Site logo

i18n 显示 about audit-log HOT 6 OPEN

rails-engine avatar rails-engine commented on June 6, 2024
i18n 显示

from audit-log.

Comments (6)

jasl avatar jasl commented on June 6, 2024

升级一下 gem?看现在的实现跟你截图里的不同了 https://github.com/rails-engine/audit-log/blob/master/lib/audit-log/model.rb#L31

from audit-log.

guojhq avatar guojhq commented on June 6, 2024

@jasl 不知道是不是我自己i18n有关配置问题,我是默认的,但问题不是你说的那个位置https://github.com/rails-engine/audit-log/blob/master/lib/audit-log.rb#L50

from audit-log.

jasl avatar jasl commented on June 6, 2024

哦,这个我一直觉得现在应该有更好的新做法了,先给你一个 workaround。

config/initializers 里建一个 locale.rb 里面一句话

I18n.backend.send(:init_translations)

这个的意思是 eager loading 翻译文件

from audit-log.

guojhq avatar guojhq commented on June 6, 2024

OK,试了一下,initializers 放好像不起作用,放在有问题的那句上面,暂时可以走下去,谢了

from audit-log.

jasl avatar jasl commented on June 6, 2024

嗯 或者放到 after_initialize 之类的Rails 应用的钩子去,具体我没动手测试,有空你试试吧,做法会好一些。

我觉得他这里写法或许有更好的做法,我有空研究一下

from audit-log.

huacnlee avatar huacnlee commented on June 6, 2024

可能是翻译没对上,或者你的 I18n 配置文件配置错误了,可以多检查检查。

这个东西是基于我们目前的项目实践里面提取出来的,多语言也有的。

from audit-log.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.