diff options
author | Jochen Topf <jochen@topf.org> | 2014-05-19 09:17:12 +0200 |
---|---|---|
committer | Jochen Topf <jochen@topf.org> | 2014-05-19 09:17:12 +0200 |
commit | 39dc0d1af37cf3bcf3d8789cc6d1828d95349292 (patch) | |
tree | 8df7196feed5615366a85f7d37a2c87e7ec14e01 /web/views | |
parent | 26737986b64effc3c424e3518672ab132fd9afd6 (diff) | |
download | taginfo-39dc0d1af37cf3bcf3d8789cc6d1828d95349292.tar taginfo-39dc0d1af37cf3bcf3d8789cc6d1828d95349292.tar.gz |
Add translations overview
Diffstat (limited to 'web/views')
-rw-r--r-- | web/views/taginfo/index.erb | 3 | ||||
-rw-r--r-- | web/views/taginfo/translations.erb | 17 |
2 files changed, 19 insertions, 1 deletions
diff --git a/web/views/taginfo/index.erb b/web/views/taginfo/index.erb index 9bd0752..32f904c 100644 --- a/web/views/taginfo/index.erb +++ b/web/views/taginfo/index.erb @@ -6,7 +6,8 @@ <h2>Menu</h2> <ul> <li><a href="/taginfo/apidoc"><%= t.taginfo.apidoc %></a></li> - <li><a href="/taginfo/i18n">taginfo text translations</a></li> + <li><a href="/taginfo/translations">Translations Overview</a></li> + <li><a href="/taginfo/i18n">Translated Texts</a></li> </ul> <h2>Software Version</h2> <p><%= @commit %></p> diff --git a/web/views/taginfo/translations.erb b/web/views/taginfo/translations.erb new file mode 100644 index 0000000..ce84bc9 --- /dev/null +++ b/web/views/taginfo/translations.erb @@ -0,0 +1,17 @@ +<div class="pre"> + <h1>Translations Overview</h1> +</div> +<div class="box resize"> + <table class="list"> +<% r18n.available_locales.sort{ |a,b| a.code <=> b.code }.each do |locale| %> +<% percent = (@num_texts[locale.code].to_f / @num_texts['en'].to_f * 100).to_i %> + <tr> + <td><span class="lang"><%= locale.code %></span></td> + <td><%= locale.title %></td> + <td class="tr"><%= @num_texts[locale.code] %>/<%= @num_texts['en'] %></td> + <td class="tr <%= percent > 90 ? 'good' : ( percent <= 80 ? 'bad' : 'okay' ) %>"><%= percent %>%</td> + <td><a href="/taginfo/i18n?lang=<%= locale.code %>">see texts</a></td> + </tr> +<% end %> + </table> +</div> |