File tree 2 files changed +37
-0
lines changed
2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -24,10 +24,20 @@ module TranslationStatus
24
24
</p>
25
25
26
26
<table>
27
+ <colgroup>
28
+ <col>
29
+ <% LANGS.each do |lang| -%>
30
+ <col class="<%= lang %>">
31
+ <% end -%>
32
+ </colgroup>
33
+ <thead>
27
34
<%= table_header %>
35
+ </thead>
36
+ <tbody>
28
37
<% posts.each do |post| -%>
29
38
<%= table_row(post) %>
30
39
<% end -%>
40
+ </tbody>
31
41
</table>
32
42
EOF
33
43
Original file line number Diff line number Diff line change @@ -36,5 +36,32 @@ <h1>News Post Translation Status</h1>
36
36
37
37
{% translation_status %}
38
38
39
+ < script type ="text/javascript ">
40
+ var languages = {
41
+ "bg" : "bg" ,
42
+ "de" : "de" ,
43
+ "es" : "es" ,
44
+ "fr" : "fr" ,
45
+ "id" : "id" ,
46
+ "it" : "it" ,
47
+ "ja" : "ja" ,
48
+ "ko" : "ko" ,
49
+ "pl" : "pl" ,
50
+ "pt" : "pt" ,
51
+ "ru" : "ru" ,
52
+ "tr" : "tr" ,
53
+ "vi" : "vi" ,
54
+ "zh-CN" : "zh_cn" ,
55
+ "zh-TW" : "zh_tw"
56
+ } ;
57
+
58
+ var code = window . navigator . language || window . navigator . userLanguage || "en" ;
59
+ if ( code . substr ( 0 , 2 ) !== "zh" ) { code = code . substr ( 0 , 2 ) ; }
60
+
61
+ var language = languages [ code ] ;
62
+ if ( language ) {
63
+ document . write ( '<style type="text/css">.' + language + '{background-color:lightgray}</style>' ) ;
64
+ }
65
+ </ script >
39
66
</ body >
40
67
</ html >
You can’t perform that action at this time.
0 commit comments