Comments (6)
升级一下 gem?看现在的实现跟你截图里的不同了 https://github.com/rails-engine/audit-log/blob/master/lib/audit-log/model.rb#L31
from audit-log.
@jasl 不知道是不是我自己i18n有关配置问题,我是默认的,但问题不是你说的那个位置https://github.com/rails-engine/audit-log/blob/master/lib/audit-log.rb#L50
from audit-log.
哦,这个我一直觉得现在应该有更好的新做法了,先给你一个 workaround。
在 config/initializers
里建一个 locale.rb
里面一句话
I18n.backend.send(:init_translations)
这个的意思是 eager loading 翻译文件
from audit-log.
OK,试了一下,initializers
放好像不起作用,放在有问题的那句上面,暂时可以走下去,谢了
from audit-log.
嗯 或者放到 after_initialize 之类的Rails 应用的钩子去,具体我没动手测试,有空你试试吧,做法会好一些。
我觉得他这里写法或许有更好的做法,我有空研究一下
from audit-log.
可能是翻译没对上,或者你的 I18n 配置文件配置错误了,可以多检查检查。
这个东西是基于我们目前的项目实践里面提取出来的,多语言也有的。
from audit-log.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from audit-log.