我的Rails应用程序不会在生产模式下更新本地化的字符串

时间:2022-02-15 03:54:05

I have a standard Rails application running with the I18n support. I have extensive caching running for this app. I edited a few strings and confirmed it worked locally. I also confirmed I have the right strings on the file for the live site. Still for some weird reason I do not see these changes for my live site even though I have not fragment cached anything here.

我有一个标准的Rails应用程序,运行I18n支持。我为这个应用程序运行了大量的缓存。我编辑了一些字符串并确认它在本地工作。我还确认我在实际网站的文件上有正确的字符串。仍然有一些奇怪的原因我没有看到我的实时网站的这些变化,即使我没有片段缓存任何在这里。

Any ideas what is going on?

有什么想法发生了什么?

1 个解决方案

#1


2  

Another one with the same problem as me :)

另一个和我一样的问题:)

I ended up with this solution: http://szeryf.wordpress.com/2008/02/02/multilingual-page-caching-in-ruby-on-rails/

我最终得到了这个解决方案:http://szeryf.wordpress.com/2008/02/02/multilingual-page-caching-in-ruby-on-rails/

I couldn't change the structure to include the language identifier in the URL as suggested here: http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/341bba9357bfc608

我无法更改结构以在网址中包含语言标识符,如下所示:http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/341bba9357bfc608

Depending on your structure and how fare you are down development, choose either one. However, it's probably easier if you have the cache either as part of your domain or your url.

根据您的结构以及您的开发速度,选择其中一个。但是,如果您将缓存作为域或网址的一部分,则可能更容易。

I hope multilingual caching will be improved in future rails versions.

我希望在未来的rails版本中可以改进多语言缓存。

#1


2  

Another one with the same problem as me :)

另一个和我一样的问题:)

I ended up with this solution: http://szeryf.wordpress.com/2008/02/02/multilingual-page-caching-in-ruby-on-rails/

我最终得到了这个解决方案:http://szeryf.wordpress.com/2008/02/02/multilingual-page-caching-in-ruby-on-rails/

I couldn't change the structure to include the language identifier in the URL as suggested here: http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/341bba9357bfc608

我无法更改结构以在网址中包含语言标识符,如下所示:http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/341bba9357bfc608

Depending on your structure and how fare you are down development, choose either one. However, it's probably easier if you have the cache either as part of your domain or your url.

根据您的结构以及您的开发速度,选择其中一个。但是,如果您将缓存作为域或网址的一部分,则可能更容易。

I hope multilingual caching will be improved in future rails versions.

我希望在未来的rails版本中可以改进多语言缓存。