mirror of
https://github.com/moebooru/moebooru
synced 2025-08-31 05:55:11 +00:00
Move i18n js side setters
Seems better done in application instead of inlined and potentially done in wrong timing. Still wrong timing though.
This commit is contained in:
@@ -27,6 +27,9 @@
|
||||
|
||||
#= require_tree ./_classes
|
||||
|
||||
I18n.defaultLocale = locale.default
|
||||
I18n.locale = locale.current
|
||||
|
||||
Moe.checkAll = new Moe.CheckAll
|
||||
Moe.timeago = new Moe.Timeago
|
||||
|
||||
|
@@ -1,4 +0,0 @@
|
||||
<script type="text/javascript">
|
||||
I18n.defaultLocale = "<%= I18n.default_locale %>";
|
||||
I18n.locale = "<%= I18n.locale %>";
|
||||
</script>
|
@@ -32,9 +32,17 @@
|
||||
<script id="user-blacklisted-tags" type="application/json">
|
||||
<%= json_escape @current_user.blacklisted_tags_array.to_json.html_safe %>
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
window.locale = {
|
||||
current: "<%= I18n.locale %>",
|
||||
default: "<%= I18n.default_locale %>",
|
||||
}
|
||||
</script>
|
||||
|
||||
<%= javascript_include_tag :application %>
|
||||
<%= javascript_include_tag 'application-legacy' %>
|
||||
<%= render 'layouts/locale' %>
|
||||
|
||||
<!--[if lt IE 8]>
|
||||
<script src="/IE8.js" type="text/javascript"></script>
|
||||
<![endif]-->
|
||||
|
Reference in New Issue
Block a user