summaryrefslogtreecommitdiff
path: root/web/taginfo.rb
diff options
context:
space:
mode:
authorJochen Topf <jochen@topf.org>2012-01-25 09:39:03 +0100
committerJochen Topf <jochen@topf.org>2012-01-25 09:39:03 +0100
commitb8ffeb2230639bbb3ed05cb04ec13c08d1866c16 (patch)
tree96fe7139faeefca28860eb4565c526be1f2ebb16 /web/taginfo.rb
parentd3699717c6c7df498d4efb82d88e071802553de3 (diff)
downloadtaginfo-b8ffeb2230639bbb3ed05cb04ec13c08d1866c16.tar
taginfo-b8ffeb2230639bbb3ed05cb04ec13c08d1866c16.tar.gz
Remove special case for I18N texts for Javascript
Diffstat (limited to 'web/taginfo.rb')
-rwxr-xr-xweb/taginfo.rb38
1 files changed, 1 insertions, 37 deletions
diff --git a/web/taginfo.rb b/web/taginfo.rb
index 384eb81..93ec312 100755
--- a/web/taginfo.rb
+++ b/web/taginfo.rb
@@ -112,7 +112,7 @@ class Taginfo < Sinatra::Base
javascript 'jquery.tipsy'
# javascript 'flexigrid-minified'
javascript 'flexigrid'
- javascript 'lang/' + r18n.locale.code
+ javascript r18n.locale.code + '/texts'
javascript 'taginfo'
# set to immediate expire on normal pages
@@ -175,42 +175,6 @@ class Taginfo < Sinatra::Base
erb :"#{js}.js", :layout => false, :content_type => 'text/javascript', :views => 'viewsjs'
end
- get '/js/lang/:lang.js' do
- expires next_update
- trans = R18n::I18n.new(params[:lang], 'i18n')
- return 'var texts = ' + {
- :flexigrid => {
- :pagetext => trans.t.flexigrid.pagetext,
- :pagestat => trans.t.flexigrid.pagestat,
- :outof => trans.t.flexigrid.outof,
- :findtext => trans.t.flexigrid.findtext,
- :procmsg => trans.t.flexigrid.procmsg,
- :nomsg => trans.t.flexigrid.nomsg,
- :errormsg => trans.t.flexigrid.errormsg,
- },
- :misc => {
- :values_less_than_one_percent => trans.t.misc.values_less_than_one_percent,
- :empty_string => trans.t.misc.empty_string,
- :all => trans.t.misc.all,
- },
- :osm => {
- :key => trans.t.osm.key,
- :keys => trans.t.osm.keys,
- :value => trans.t.osm.value,
- :values => trans.t.osm.values,
- :tag => trans.t.osm.tag,
- :tags => trans.t.osm.tags,
- :node => trans.t.osm.node,
- :nodes => trans.t.osm.nodes,
- :way => trans.t.osm.way,
- :ways => trans.t.osm.ways,
- :relation => trans.t.osm.relation,
- :relations => trans.t.osm.relations,
- :all => trans.t.osm.all
- },
- }.to_json + ";\n"
- end
-
#--------------------------------------------------------------------------
load 'lib/api/db.rb'