aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--web/i18n/de.yml3
-rw-r--r--web/i18n/en.yml1
-rw-r--r--web/lib/ui/taginfo.rb (renamed from web/lib/ui/i18n.rb)16
-rwxr-xr-xweb/taginfo.rb4
-rw-r--r--web/views/about.erb2
-rw-r--r--web/views/taginfo/apidoc.erb (renamed from web/views/apidoc.erb)0
-rw-r--r--web/views/taginfo/index.erb10
7 files changed, 31 insertions, 5 deletions
diff --git a/web/i18n/de.yml b/web/i18n/de.yml
index 3c03090..8fea389 100644
--- a/web/i18n/de.yml
+++ b/web/i18n/de.yml
@@ -23,11 +23,12 @@ taginfo:
download: Download
about: Über Taginfo
contact: Kontakt
+ meta: Meta
wiki: Wiki
report: Report
reports: Reports
international: International
- apidoc: API-Dokumenatation
+ apidoc: API-Dokumentation
test: Test
map: Karte
maps: Karten
diff --git a/web/i18n/en.yml b/web/i18n/en.yml
index 575d728..3fa663a 100644
--- a/web/i18n/en.yml
+++ b/web/i18n/en.yml
@@ -24,6 +24,7 @@ taginfo:
download: Download
about: About taginfo
contact: Contact
+ meta: Meta
wiki: taginfo wiki page
report: Report
reports: Reports
diff --git a/web/lib/ui/i18n.rb b/web/lib/ui/taginfo.rb
index d801daf..deca152 100644
--- a/web/lib/ui/i18n.rb
+++ b/web/lib/ui/taginfo.rb
@@ -1,4 +1,4 @@
-# web/lib/ui/i18n.rb
+# web/lib/ui/taginfo.rb
class Taginfo < Sinatra::Base
def i18n_walk(line, level, path, en, other)
@@ -24,7 +24,14 @@ class Taginfo < Sinatra::Base
out
end
+ get '/taginfo' do
+ erb :'taginfo/index'
+ end
+
get '/taginfo/i18n' do
+ @title = 'Translations of taginfo texts'
+ @section = 'taginfo'
+ @section_title = t.taginfo.meta
@lang = params[:lang] || 'de'
@i18n_en = YAML.load_file("i18n/en.yml")
begin
@@ -42,4 +49,11 @@ class Taginfo < Sinatra::Base
erb :'taginfo/i18n'
end
+ get '/taginfo/apidoc' do
+ @title = t.taginfo.apidoc
+ @section = 'taginfo'
+ @section_title = t.taginfo.meta
+ erb :'taginfo/apidoc'
+ end
+
end
diff --git a/web/taginfo.rb b/web/taginfo.rb
index 6dd6700..439501e 100755
--- a/web/taginfo.rb
+++ b/web/taginfo.rb
@@ -160,7 +160,7 @@ class Taginfo < Sinatra::Base
#-------------------------------------
- %w(about apidoc download keys sources tags).each do |page|
+ %w(about download keys sources tags).each do |page|
get '/' + page do
@title = (page =~ /^(keys|tags)$/) ? t.osm[page] : t.taginfo[page]
erb page.to_sym
@@ -189,7 +189,7 @@ class Taginfo < Sinatra::Base
load 'lib/ui/keys_tags.rb'
load 'lib/ui/reports.rb'
load 'lib/ui/search.rb'
- load 'lib/ui/i18n.rb'
+ load 'lib/ui/taginfo.rb'
load 'lib/ui/test.rb'
# run application
diff --git a/web/views/about.erb b/web/views/about.erb
index ac5fa09..694e48d 100644
--- a/web/views/about.erb
+++ b/web/views/about.erb
@@ -65,7 +65,7 @@
you. See the <a href="/download">download page</a> for more information.</p>
<p>Taginfo data can also be accessed through a REST <b>API</b>. See the
- <a href="/apidoc">API call documentation</a> for the details, some general information is
+ <a href="/taginfo/apidoc">API call documentation</a> for the details, some general information is
<a class="extlink" href="http://wiki.openstreetmap.org/wiki/Taginfo/API">on the wiki</a>.
The server running the Taginfo API does not have unlimited resources.
Please use the API responsibly. If in doubt contact the taginfo maintainers.</p>
diff --git a/web/views/apidoc.erb b/web/views/taginfo/apidoc.erb
index d3685b3..d3685b3 100644
--- a/web/views/apidoc.erb
+++ b/web/views/taginfo/apidoc.erb
diff --git a/web/views/taginfo/index.erb b/web/views/taginfo/index.erb
new file mode 100644
index 0000000..582056d
--- /dev/null
+++ b/web/views/taginfo/index.erb
@@ -0,0 +1,10 @@
+<div class="pre">
+ <h1>taginfo META</h1>
+ <p>This section is for developers only.</p>
+</div>
+<div class="box resize">
+ <ul>
+ <li><a href="/taginfo/apidoc"><%= t.taginfo.apidoc %></a></li>
+ <li><a href="/taginfo/i18n">taginfo text translations</a></li>
+ </ul>
+</div>