diff options
author | Jochen Topf <jochen@topf.org> | 2012-01-25 10:53:39 +0100 |
---|---|---|
committer | Jochen Topf <jochen@topf.org> | 2012-01-25 10:53:39 +0100 |
commit | beaabfd589a9f04ea5ea6e40c8ab1515ceb0aefa (patch) | |
tree | a20ee1f91ac81b36e29ab75329c62a5ee2b44b1c /web/views | |
parent | b8ffeb2230639bbb3ed05cb04ec13c08d1866c16 (diff) | |
download | taginfo-beaabfd589a9f04ea5ea6e40c8ab1515ceb0aefa.tar taginfo-beaabfd589a9f04ea5ea6e40c8ab1515ceb0aefa.tar.gz |
Add page showing i18n translations
Diffstat (limited to 'web/views')
-rw-r--r-- | web/views/taginfo/i18n.erb | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/web/views/taginfo/i18n.erb b/web/views/taginfo/i18n.erb new file mode 100644 index 0000000..8445efa --- /dev/null +++ b/web/views/taginfo/i18n.erb @@ -0,0 +1,35 @@ +<div class="pre"> + <h1>Translations of taginfo texts</h1> +</div> +<div class="box resize" style="overflow: auto;"> +<% if @error %> + <p style="color: red;"><%= @error %></p> +<% else %> + <table class="list"> + <th></th> + <th><a class="extlink" style="float: right;" href="https://github.com/joto/taginfo/blob/master/web/i18n/en.yml">on github</a>English</th> + <th><a class="extlink" style="float: right;" href="https://github.com/joto/taginfo/blob/master/web/i18n/<%= @lang %>.yml">on github</a> +<form action="/taginfo/i18n" method="GET"> + <select id="lang" name="lang"> +<% r18n.available_locales.sort{ |a,b| a.title <=> b.title }.each do |locale| %> + <option value="<%= locale.code %>"<%= @lang == locale.code ? ' selected="selected"' : ''%>><%= locale.title %></option> +<% end %> + </select> +</form> + </th> +<%= i18n_walk(@line, 0, '', @i18n_en, @i18n_lang) %> + </table> +</div> +<% +end +javascript do + JS.raw(<<"JAVASCRIPT") +function page_init() { + jQuery('span[title]').tipsy({ opacity: 1, delayIn: 500, gravity: 'w' }); + jQuery('#lang').bind('change', function() { + jQuery('form').submit(); + }); +} +JAVASCRIPT +end +%> |