summaryrefslogtreecommitdiff
path: root/web/viewsjs
diff options
context:
space:
mode:
authorJochen Topf <jochen@topf.org>2012-01-24 12:09:17 +0100
committerJochen Topf <jochen@topf.org>2012-01-24 12:09:17 +0100
commitf06f6855c4b582ff2a245bfe93ad206a815e0941 (patch)
treebab72aea74c57ac9c975c4fb006518f4a3920be0 /web/viewsjs
parent7fe2786bfb80eae34b165ead01372cd51be90f48 (diff)
downloadtaginfo-f06f6855c4b582ff2a245bfe93ad206a815e0941.tar
taginfo-f06f6855c4b582ff2a245bfe93ad206a815e0941.tar.gz
Internationalized keys and tags tables
Diffstat (limited to 'web/viewsjs')
-rw-r--r--web/viewsjs/keys.js.erb22
-rw-r--r--web/viewsjs/tags.js.erb14
2 files changed, 22 insertions, 14 deletions
diff --git a/web/viewsjs/keys.js.erb b/web/viewsjs/keys.js.erb
index b1aebe4..e1bfac4 100644
--- a/web/viewsjs/keys.js.erb
+++ b/web/viewsjs/keys.js.erb
@@ -1,17 +1,21 @@
+<%
+ osm = @trans.t.osm
+ table = @trans.t.pages.keys.table
+ %>
function page_init() {
create_flexigrid('grid-keys', {
url: '/api/2/db/keys?include=prevalent_values',
colModel: [
{ display: '<%= @trans.t.osm.key %>', name: 'key', width: 160, sortable: true },
- { display: '<span title="Number of objects with this key (as absolute value and as percentage of all nodes, ways, and relations)"><img src="/img/types/all.16.png" alt=""/> Total</span>', name: 'count_all', width: 200, sortable: true, align: 'center' },
- { display: '<span title="Number of nodes with this key (as absolute value and as percentage of tagged nodes, ie. nodes without any tags are ignored)"><img src="/img/types/node.16.png" alt=""/> Nodes</span>', name: 'count_nodes', width: 220, sortable: true, align: 'center' },
- { display: '<span title="Number of ways with this key (as absolute value and as percentage of all ways)"><img src="/img/types/way.16.png" alt=""/> Ways</span>', name: 'count_ways', width: 220, sortable: true, align: 'center' },
- { display: '<span title="Number of relations with this key (as absolute value and as percentage of all relations)"><img src="/img/types/relation.16.png" alt=""/> Relation</span>', name: 'count_relations', width: 220, sortable: true, align: 'center' },
- { display: '<span title="Number of different users who last changed objects with this key">Users</span>', name: 'users_all', width: 44, sortable: true, align: 'right' },
- { display: '<img src="/img/sources/wiki.16.png" alt="Wiki" title="Key has a wiki page"/>', name: 'in_wiki', width: 20, sortable: true, align: 'center' },
- { display: '<img src="/img/sources/josm.16.png" alt="JOSM" title="Key appears in JOSM config"/>', name: 'in_josm', width: 20, sortable: true, align: 'center' },
- { display: '<span title="Number of different values for this key">Values</span>', name: 'values_all', width: 70, sortable: true, align: 'right' },
- { display: '<span title="Up to ten of the most common values for this key (only if more than 1% of tags with this key have this value)">Prevalent Values</span>', name: 'prevalent_values', width: 500, sortable: true }
+ { display: '<span title="<%= table.total_tooltip %>"><img src="/img/types/all.16.png" width="16" height="16" alt=""/> <%= table.total %></span>', name: 'count_all', width: 200, sortable: true, align: 'center' },
+ { display: '<span title="<%= table.nodes_tooltip %>"><img src="/img/types/node.16.png" width="16" height="16" alt=""/> <%= osm.nodes %></span>', name: 'count_nodes', width: 220, sortable: true, align: 'center' },
+ { display: '<span title="<%= table.ways_tooltip %>"><img src="/img/types/way.16.png" width="16" height="16" alt=""/> <%= osm.ways %></span>', name: 'count_ways', width: 220, sortable: true, align: 'center' },
+ { display: '<span title="<%= table.relations_tooltip %>"><img src="/img/types/relation.16.png" width="16" height="16" alt=""/> <%= osm.relations %></span>', name: 'count_relations', width: 220, sortable: true, align: 'center' },
+ { display: '<span title="<%= table.users_tooltip %>"><%= osm.users %></span>', name: 'users_all', width: 44, sortable: true, align: 'right' },
+ { display: '<img src="/img/sources/wiki.16.png" alt="Wiki" width="16" height="16" title="<%= table.in_wiki_tooltip %>"/>', name: 'in_wiki', width: 20, sortable: true, align: 'center' },
+ { display: '<img src="/img/sources/josm.16.png" alt="JOSM" width="16" height="16" title="<%= table.in_josm_tooltip %>"/>', name: 'in_josm', width: 20, sortable: true, align: 'center' },
+ { display: '<span title="<%= table.values_tooltip %>"><%= osm.values %></span>', name: 'values_all', width: 70, sortable: true, align: 'right' },
+ { display: '<span title="<%= table.prevalent_values_tooltip %>"><%= table.prevalent_values %></span>', name: 'prevalent_values', width: 500, sortable: true }
],
searchitems: [
{ display: '<%= @trans.t.osm.key %>', name: 'key' }
diff --git a/web/viewsjs/tags.js.erb b/web/viewsjs/tags.js.erb
index 07133c5..fa378bd 100644
--- a/web/viewsjs/tags.js.erb
+++ b/web/viewsjs/tags.js.erb
@@ -1,12 +1,16 @@
+<%
+ osm = @trans.t.osm
+ table = @trans.t.pages.tags.table
+ %>
function page_init() {
create_flexigrid('grid-tags', {
url: '/api/2/db/tags',
colModel: [
- { display: texts.osm.tag, name: 'tag', width: 300, sortable: true },
- { display: '<span title="Number of objects with this tag (as absolute value and as percentage of all nodes, ways, and relations)"><img src="/img/types/all.16.png" alt=""/> Total</span>', name: 'count_all', width: 260, sortable: true, align: 'center' },
- { display: '<span title="Number of nodes with this tag (as absolute value and as percentage of tagged nodes, ie. nodes without any tags are ignored)"><img src="/img/types/node.16.png" alt=""/> Nodes</span>', name: 'count_nodes', width: 220, sortable: true, align: 'center' },
- { display: '<span title="Number of ways with this tag (as absolute value and as percentage of all ways)"><img src="/img/types/way.16.png" alt=""/> Ways</span>', name: 'count_ways', width: 220, sortable: true, align: 'center' },
- { display: '<span title="Number of relations with this tag (as absolute value and as percentage of all relations)"><img src="/img/types/relation.16.png" alt=""/> Relation</span>', name: 'count_relations', width: 220, sortable: true, align: 'center' }
+ { display: '<%= osm.tag %>', name: 'tag', width: 300, sortable: true },
+ { display: '<span title="<%= table.total_tooltip %>"><img src="/img/types/all.16.png" width="16" height="16" alt=""/> <%= table.total %></span>', name: 'count_all', width: 260, sortable: true, align: 'center' },
+ { display: '<span title="<%= table.nodes_tooltip %>"><img src="/img/types/node.16.png" width="16" height="16" alt=""/> <%= osm.nodes %></span>', name: 'count_nodes', width: 220, sortable: true, align: 'center' },
+ { display: '<span title="<%= table.ways_tooltip %>"><img src="/img/types/way.16.png" width="16" height="16" alt=""/> <%= osm.ways %></span>', name: 'count_ways', width: 220, sortable: true, align: 'center' },
+ { display: '<span title="<%= table.relations_tooltip %>"><img src="/img/types/relation.16.png" width="16" height="16" alt=""/> <%= osm.relations %></span>', name: 'count_relations', width: 220, sortable: true, align: 'center' }
],
searchitems: [
{ display: texts.osm.tag, name: 'tag' }