tolk 3.0.1 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/tolk/actions.js +1 -1
- data/app/assets/javascripts/tolk/layout.js +1 -1
- data/app/assets/stylesheets/tolk/screen.scss +432 -0
- data/app/controllers/tolk/application_controller.rb +1 -1
- data/app/models/tolk/locale.rb +8 -8
- data/app/views/layouts/tolk/application.html.erb +16 -7
- data/app/views/tolk/_blank_canva.svg +1 -0
- data/app/views/tolk/_empty.svg +1 -0
- data/app/views/tolk/_houra.svg +1 -0
- data/app/views/tolk/_nav.html.erb +26 -0
- data/app/views/tolk/_no_data.svg +1 -0
- data/app/views/tolk/locales/all.html.erb +76 -57
- data/app/views/tolk/locales/index.html.erb +40 -23
- data/app/views/tolk/locales/show.html.erb +58 -45
- data/app/views/tolk/searches/_form.html.erb +1 -1
- data/app/views/tolk/searches/show.html.erb +57 -51
- data/lib/generators/tolk/templates/initializer.erb +1 -0
- data/lib/tolk/config.rb +16 -0
- data/lib/tolk/import.rb +12 -12
- data/lib/tolk/sync.rb +22 -7
- data/lib/tolk/version.rb +1 -1
- data/lib/tolk/yaml.rb +1 -1
- metadata +37 -13
- data/app/assets/stylesheets/tolk/screen.css +0 -401
@@ -1,62 +1,68 @@
|
|
1
|
-
|
2
|
-
<%= render :partial => "form", :locals => { :locale => @locale } %>
|
3
|
-
</h3>
|
1
|
+
<%= render 'tolk/nav' %>
|
4
2
|
|
5
|
-
<div class="
|
6
|
-
<%=
|
7
|
-
|
8
|
-
<%= link_to "Completed translations", tolk.all_locale_path(@locale) %>
|
3
|
+
<div class="search">
|
4
|
+
<%= render partial: "form", locals: { locale: @locale } %>
|
9
5
|
</div>
|
10
6
|
|
11
|
-
|
12
|
-
|
7
|
+
<% if @phrases.any? %>
|
8
|
+
<div class="translations">
|
13
9
|
<%= form_for @locale do |locale_form| %>
|
14
|
-
<table
|
15
|
-
<
|
16
|
-
<
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
10
|
+
<table>
|
11
|
+
<thead>
|
12
|
+
<tr>
|
13
|
+
<th><%= @locale.language_name -%></th>
|
14
|
+
<th class="actions"></th>
|
15
|
+
<th><%= Tolk::Locale.primary_language_name -%></th>
|
16
|
+
</tr>
|
17
|
+
</thead>
|
18
|
+
<tbody>
|
19
|
+
<% @phrases.each do |phrase| %>
|
20
|
+
<% if translation = phrase.translations.where(locale_id: @locale.id).first || Tolk::Translation.new(locale: @locale, phrase: phrase) %>
|
21
|
+
<tr>
|
22
|
+
<td class="translation">
|
23
|
+
<%= hidden_field_tag :"translations[][id]", translation.id, id: "#{translation.object_id}_id" %>
|
24
|
+
<%= hidden_field_tag :"translations[][phrase_id]", phrase.id, id: "#{translation.object_id}_phrase_id" %>
|
25
|
+
<%= hidden_field_tag :"translations[][locale_id]", translation.locale_id, id: "#{translation.object_id}_locale_id" %>
|
26
|
+
<%= text_area_tag :"translations[][text]", format_i18n_text_area_value(translation.text),
|
27
|
+
class: "locale",
|
28
|
+
id: "#{translation.object_id}_text",
|
29
|
+
onfocus: "$(this).up('tr').addClassName('active');",
|
30
|
+
onblur: "$(this).up('tr').removeClassName('active');" %>
|
31
|
+
</td>
|
32
|
+
<td class="actions">
|
33
|
+
<a class="copy" href="#" tabindex="-1" title="Copy original translation">←</a><br>
|
34
|
+
<span class="warning" title="Interpolation keys don't match">⚠</span>
|
35
|
+
</td>
|
36
|
+
<td class="original">
|
37
|
+
<%= text_area_tag :"translations[][original_text]", format_i18n_text_area_value(phrase.translations.primary.text), disabled: true %>
|
21
38
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
<%= text_area_tag :"translations[][text]", format_i18n_text_area_value(translation.text), :class => "locale", :id => "#{translation.object_id}_text", :onfocus => "$(this).up('tr').addClassName('active');", :onblur => "$(this).up('tr').removeClassName('active');" %>
|
29
|
-
</td>
|
30
|
-
<td class="actions">
|
31
|
-
<a class="copy" href="#" tabindex="-1" title="Copy original translation">←</a><br>
|
32
|
-
<span class="warning" title="Interpolation keys don't match">⚠</span>
|
33
|
-
</td>
|
34
|
-
<td class="original">
|
35
|
-
<%= text_area_tag :"translations[][original_text]", format_i18n_text_area_value(phrase.translations.primary.text), :disabled => true %>
|
39
|
+
<% if params[:q].present? -%>
|
40
|
+
<%= highlight(format_i18n_value(phrase.translations.primary.text), params[:q]) -%>
|
41
|
+
<% else -%>
|
42
|
+
<%= format_i18n_value(phrase.translations.primary.text) -%>
|
43
|
+
<% end -%>
|
44
|
+
<%= boolean_warning if phrase.translations.primary.boolean? -%>
|
36
45
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
<span class="key" title="<%= phrase.key %>"><%= params[:k].present? ?
|
45
|
-
highlight(h(truncate(phrase.key, :length => 100)), params[:k]) :
|
46
|
-
h(truncate(phrase.key, :length => 100)) %></span>
|
47
|
-
</td>
|
48
|
-
</tr>
|
46
|
+
<span class="translation-key" title="<%= phrase.key %>"><%= params[:k].present? ?
|
47
|
+
highlight(h(truncate(phrase.key, length: 100)), params[:k]) :
|
48
|
+
h(truncate(phrase.key, length: 100)) %></span>
|
49
|
+
</td>
|
50
|
+
</tr>
|
51
|
+
<% end %>
|
49
52
|
<% end %>
|
50
|
-
|
53
|
+
</tbody>
|
51
54
|
</table>
|
52
55
|
<div class="table_submit">
|
53
|
-
<p><%= locale_form.submit "Save changes", :
|
56
|
+
<p><%= locale_form.submit "Save changes", class: 'save-translations btn btn--large' %></p>
|
54
57
|
</div>
|
55
58
|
<% end %>
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
59
|
+
<%= tolk_paginate @phrases %>
|
60
|
+
</div>
|
61
|
+
<% else %>
|
62
|
+
<div class="empty-state">
|
63
|
+
<%= render 'tolk/no_data.svg' %>
|
64
|
+
<p class="empty-state__msg">
|
65
|
+
No search results.
|
66
|
+
</p>
|
67
|
+
</div>
|
68
|
+
<% end %>
|
data/lib/tolk/config.rb
CHANGED
@@ -23,6 +23,16 @@ module Tolk
|
|
23
23
|
# strip translation texts automatically
|
24
24
|
attr_accessor :strip_texts
|
25
25
|
|
26
|
+
# specify line width which Yaml.dump will use to break lines. -1 for not breaking
|
27
|
+
attr_accessor :yaml_line_width
|
28
|
+
|
29
|
+
# specify controller to inherit from to keep Tolk controllers
|
30
|
+
# in the same context than the rest of your app
|
31
|
+
attr_accessor :base_controller
|
32
|
+
|
33
|
+
# Ignore specific keys
|
34
|
+
attr_accessor :ignore_keys
|
35
|
+
|
26
36
|
def reset
|
27
37
|
@exclude_gems_token = false
|
28
38
|
|
@@ -78,6 +88,12 @@ module Tolk
|
|
78
88
|
'zh-CN' => 'Chinese (Simplified)',
|
79
89
|
'zh-TW' => 'Chinese (Traditional)'
|
80
90
|
}
|
91
|
+
|
92
|
+
@yaml_line_width = Psych::Handler::OPTIONS.line_width # Psych::Handler::DumperOptions uses 0 as "default" for unset
|
93
|
+
|
94
|
+
@base_controller = 'ActionController::Base'
|
95
|
+
|
96
|
+
@ignore_keys = []
|
81
97
|
end
|
82
98
|
end
|
83
99
|
|
data/lib/tolk/import.rb
CHANGED
@@ -24,27 +24,27 @@ module Tolk
|
|
24
24
|
data = locale.read_locale_file
|
25
25
|
return unless data
|
26
26
|
|
27
|
-
|
27
|
+
phrases_by_key = Tolk::Phrase.all.index_by(&:key)
|
28
|
+
translated_phrase_ids = Set.new(locale.translations.pluck(:phrase_id))
|
28
29
|
count = 0
|
29
30
|
|
30
31
|
data.each do |key, value|
|
31
|
-
phrase =
|
32
|
-
|
33
|
-
if phrase
|
34
|
-
translation = locale.translations.new(:text => value, :phrase => phrase)
|
35
|
-
if translation.save
|
36
|
-
count = count + 1
|
37
|
-
elsif translation.errors[:variables].present?
|
38
|
-
puts "[WARN] Key '#{key}' from '#{locale_name}.yml' could not be saved: #{translation.errors[:variables].first}"
|
39
|
-
end
|
40
|
-
else
|
32
|
+
phrase = phrases_by_key[key]
|
33
|
+
unless phrase
|
41
34
|
puts "[ERROR] Key '#{key}' was found in '#{locale_name}.yml' but #{Tolk::Locale.primary_language_name} translation is missing"
|
35
|
+
next
|
36
|
+
end
|
37
|
+
next if translated_phrase_ids.include?(phrase.id)
|
38
|
+
translation = locale.translations.new(:text => value, :phrase => phrase)
|
39
|
+
if translation.save
|
40
|
+
count = count + 1
|
41
|
+
elsif translation.errors[:variables].present?
|
42
|
+
puts "[WARN] Key '#{key}' from '#{locale_name}.yml' could not be saved: #{translation.errors[:variables].first}"
|
42
43
|
end
|
43
44
|
end
|
44
45
|
|
45
46
|
puts "[INFO] Imported #{count} keys from #{locale_name}.yml"
|
46
47
|
end
|
47
|
-
|
48
48
|
end
|
49
49
|
|
50
50
|
def read_locale_file
|
data/lib/tolk/sync.rb
CHANGED
@@ -30,7 +30,8 @@ module Tolk
|
|
30
30
|
I18n.backend.send :init_translations unless I18n.backend.initialized? # force load
|
31
31
|
end
|
32
32
|
translations = flat_hash(I18n.backend.send(:translations)[primary_locale.name.to_sym])
|
33
|
-
filter_out_i18n_keys(translations.merge(read_primary_locale_file))
|
33
|
+
filtered = filter_out_i18n_keys(translations.merge(read_primary_locale_file))
|
34
|
+
filter_out_ignored_keys(filtered)
|
34
35
|
end
|
35
36
|
|
36
37
|
def read_primary_locale_file
|
@@ -62,30 +63,44 @@ module Tolk
|
|
62
63
|
primary_locale = self.primary_locale
|
63
64
|
|
64
65
|
# Handle deleted phrases
|
65
|
-
|
66
|
+
Tolk::Phrase.where.not(:key => translations.keys).destroy_all
|
66
67
|
|
67
|
-
|
68
|
+
phrases_by_key = Tolk::Phrase.all.index_by(&:key)
|
69
|
+
primary_translation_by_phrase_id = primary_locale.translations.index_by(&:phrase_id)
|
68
70
|
|
69
71
|
translations.each do |key, value|
|
70
72
|
next if value.is_a?(Proc)
|
71
73
|
# Create phrase and primary translation if missing
|
72
|
-
|
73
|
-
translation =
|
74
|
+
phrase = phrases_by_key[key] || Tolk::Phrase.create!(:key => key)
|
75
|
+
translation = primary_translation_by_phrase_id[phrase.id]
|
76
|
+
translation ||= primary_locale.translations.build(:phrase => phrase)
|
74
77
|
translation.text = value
|
75
78
|
|
76
79
|
if translation.changed? && !translation.new_record?
|
77
80
|
# Set the primary updated flag if the primary translation has changed and it is not a new record.
|
78
|
-
|
81
|
+
phrase.translations.where.not(:locale_id => primary_locale.id).update_all({ :primary_updated => true })
|
79
82
|
end
|
80
83
|
|
81
84
|
translation.primary = true
|
82
|
-
translation.save!
|
85
|
+
translation.save! if translation.changed?
|
83
86
|
end
|
84
87
|
end
|
85
88
|
|
86
89
|
def filter_out_i18n_keys(flat_hash)
|
87
90
|
flat_hash.reject { |key, value| key.starts_with? "i18n" }
|
88
91
|
end
|
92
|
+
|
93
|
+
def filter_out_ignored_keys(flat_hash)
|
94
|
+
ignored = Tolk.config.ignore_keys
|
95
|
+
|
96
|
+
return flat_hash unless ignored.any?
|
97
|
+
|
98
|
+
ignored_escaped = ignored.map { |key| Regexp.escape(key) }
|
99
|
+
|
100
|
+
regexp = Regexp.new(/\A(#{ignored_escaped.join('|')})(:?\.|\Z)/)
|
101
|
+
|
102
|
+
flat_hash.reject { |key, _| regexp === key }
|
103
|
+
end
|
89
104
|
end
|
90
105
|
end
|
91
106
|
end
|
data/lib/tolk/version.rb
CHANGED
data/lib/tolk/yaml.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tolk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
@@ -9,10 +9,10 @@ authors:
|
|
9
9
|
- Emilio Tagua
|
10
10
|
- Thomas Darde
|
11
11
|
- Ferran Basora
|
12
|
-
autorequire:
|
12
|
+
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date:
|
15
|
+
date: 2020-07-22 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: rails
|
@@ -42,6 +42,20 @@ dependencies:
|
|
42
42
|
- - ">="
|
43
43
|
- !ruby/object:Gem::Version
|
44
44
|
version: 0.8.6
|
45
|
+
- !ruby/object:Gem::Dependency
|
46
|
+
name: sassc
|
47
|
+
requirement: !ruby/object:Gem::Requirement
|
48
|
+
requirements:
|
49
|
+
- - ">="
|
50
|
+
- !ruby/object:Gem::Version
|
51
|
+
version: '0'
|
52
|
+
type: :runtime
|
53
|
+
prerelease: false
|
54
|
+
version_requirements: !ruby/object:Gem::Requirement
|
55
|
+
requirements:
|
56
|
+
- - ">="
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
version: '0'
|
45
59
|
- !ruby/object:Gem::Dependency
|
46
60
|
name: capybara
|
47
61
|
requirement: !ruby/object:Gem::Requirement
|
@@ -60,16 +74,22 @@ dependencies:
|
|
60
74
|
name: sqlite3
|
61
75
|
requirement: !ruby/object:Gem::Requirement
|
62
76
|
requirements:
|
63
|
-
- - "
|
77
|
+
- - "~>"
|
64
78
|
- !ruby/object:Gem::Version
|
65
|
-
version: '
|
79
|
+
version: '1.3'
|
80
|
+
- - "<"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '1.5'
|
66
83
|
type: :development
|
67
84
|
prerelease: false
|
68
85
|
version_requirements: !ruby/object:Gem::Requirement
|
69
86
|
requirements:
|
70
|
-
- - "
|
87
|
+
- - "~>"
|
71
88
|
- !ruby/object:Gem::Version
|
72
|
-
version: '
|
89
|
+
version: '1.3'
|
90
|
+
- - "<"
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: '1.5'
|
73
93
|
- !ruby/object:Gem::Dependency
|
74
94
|
name: mocha
|
75
95
|
requirement: !ruby/object:Gem::Requirement
|
@@ -128,7 +148,7 @@ files:
|
|
128
148
|
- app/assets/javascripts/tolk/libraries.js
|
129
149
|
- app/assets/stylesheets/tolk/application.css
|
130
150
|
- app/assets/stylesheets/tolk/reset.css
|
131
|
-
- app/assets/stylesheets/tolk/screen.
|
151
|
+
- app/assets/stylesheets/tolk/screen.scss
|
132
152
|
- app/controllers/tolk/application_controller.rb
|
133
153
|
- app/controllers/tolk/locales_controller.rb
|
134
154
|
- app/controllers/tolk/searches_controller.rb
|
@@ -137,6 +157,11 @@ files:
|
|
137
157
|
- app/models/tolk/phrase.rb
|
138
158
|
- app/models/tolk/translation.rb
|
139
159
|
- app/views/layouts/tolk/application.html.erb
|
160
|
+
- app/views/tolk/_blank_canva.svg
|
161
|
+
- app/views/tolk/_empty.svg
|
162
|
+
- app/views/tolk/_houra.svg
|
163
|
+
- app/views/tolk/_nav.html.erb
|
164
|
+
- app/views/tolk/_no_data.svg
|
140
165
|
- app/views/tolk/locales/all.html.erb
|
141
166
|
- app/views/tolk/locales/index.html.erb
|
142
167
|
- app/views/tolk/locales/show.atom.builder
|
@@ -163,7 +188,7 @@ homepage: https://github.com/tolk/tolk
|
|
163
188
|
licenses:
|
164
189
|
- MIT
|
165
190
|
metadata: {}
|
166
|
-
post_install_message:
|
191
|
+
post_install_message:
|
167
192
|
rdoc_options: []
|
168
193
|
require_paths:
|
169
194
|
- lib
|
@@ -171,16 +196,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
171
196
|
requirements:
|
172
197
|
- - ">="
|
173
198
|
- !ruby/object:Gem::Version
|
174
|
-
version: 2.
|
199
|
+
version: 2.5.0
|
175
200
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
176
201
|
requirements:
|
177
202
|
- - ">="
|
178
203
|
- !ruby/object:Gem::Version
|
179
204
|
version: '0'
|
180
205
|
requirements: []
|
181
|
-
|
182
|
-
|
183
|
-
signing_key:
|
206
|
+
rubygems_version: 3.1.4
|
207
|
+
signing_key:
|
184
208
|
specification_version: 4
|
185
209
|
summary: Rails engine providing web interface for managing i18n yaml files
|
186
210
|
test_files: []
|
@@ -1,401 +0,0 @@
|
|
1
|
-
/*-------------------------------------------------
|
2
|
-
Defaults
|
3
|
-
-------------------------------------------------*/
|
4
|
-
|
5
|
-
acronym, abbr {
|
6
|
-
font-variant: small-caps;
|
7
|
-
text-transform: lowercase;
|
8
|
-
font-weight: bold;
|
9
|
-
}
|
10
|
-
|
11
|
-
.center {text-align: center;}
|
12
|
-
.large {font-size: larger;}
|
13
|
-
.small {font-size: smaller;}
|
14
|
-
strong {font-weight: bold;}
|
15
|
-
em {font-style: italic;}
|
16
|
-
|
17
|
-
.clear {clear: both;}
|
18
|
-
.clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
|
19
|
-
.clearfix { display: inline-block; }
|
20
|
-
.clearfix{ display: block; }
|
21
|
-
|
22
|
-
a {color: #888;}
|
23
|
-
a:hover {color: #000;}
|
24
|
-
|
25
|
-
/*-------------------------------------------------
|
26
|
-
Layout
|
27
|
-
-------------------------------------------------*/
|
28
|
-
|
29
|
-
body {
|
30
|
-
font-family: "Lucida Sans", "Lucida Grande", "Lucida Sans Unicode", sans-serif;
|
31
|
-
background: #e5e5e5;
|
32
|
-
color: #333;
|
33
|
-
margin: 0;
|
34
|
-
padding: 0;
|
35
|
-
font-size: 14px;
|
36
|
-
line-height: 21px;
|
37
|
-
text-align: left;
|
38
|
-
}
|
39
|
-
|
40
|
-
div#container {
|
41
|
-
margin: 2% 4%;
|
42
|
-
padding: 25px;
|
43
|
-
background: #fff;
|
44
|
-
-webkit-border-radius: 20px;
|
45
|
-
-moz-border-radius: 20px;
|
46
|
-
border-radius: 20px;
|
47
|
-
box-shadow: 0px 0px 15px rgba(00,00,00,0.5);
|
48
|
-
-moz-box-shadow: 0px 0px 15px rgba(00,00,00,0.5);
|
49
|
-
-webkit-box-shadow: 0px 0px 15px rgba(00,00,00,0.5);
|
50
|
-
}
|
51
|
-
|
52
|
-
div#head {
|
53
|
-
margin: -25px -25px 0;
|
54
|
-
background: #111;
|
55
|
-
color: #999;
|
56
|
-
padding: 25px 25px 20px 15px;
|
57
|
-
-webkit-border-top-left-radius: 20px;
|
58
|
-
-webkit-border-top-right-radius: 20px;
|
59
|
-
-moz-border-radius-topleft: 20px;
|
60
|
-
-moz-border-radius-topright: 20px;
|
61
|
-
border-top-left-radius: 20px;
|
62
|
-
border-top-right-radius: 20px;
|
63
|
-
font-size: 18px;
|
64
|
-
}
|
65
|
-
|
66
|
-
div#head a {
|
67
|
-
color: #2fadcf;
|
68
|
-
font-weight: bold;
|
69
|
-
text-decoration: none;
|
70
|
-
}
|
71
|
-
|
72
|
-
div#head span {
|
73
|
-
padding: 8px 6px;
|
74
|
-
margin-right: 1px;
|
75
|
-
}
|
76
|
-
|
77
|
-
div#head span.home {
|
78
|
-
background: #333;
|
79
|
-
}
|
80
|
-
|
81
|
-
div#head span.locale {
|
82
|
-
background: #444;
|
83
|
-
}
|
84
|
-
|
85
|
-
div#head span.locale a {
|
86
|
-
color: #fff;
|
87
|
-
}
|
88
|
-
|
89
|
-
div#head span.locale form.button_to {
|
90
|
-
display: inline;
|
91
|
-
}
|
92
|
-
|
93
|
-
div#head span.locale form.button_to div {
|
94
|
-
display: inline;
|
95
|
-
}
|
96
|
-
|
97
|
-
div#head span.locale form.button_to div input {
|
98
|
-
color: #fff;
|
99
|
-
background: none;
|
100
|
-
border: 0;
|
101
|
-
font-weight: bold;
|
102
|
-
text-decoration: none;
|
103
|
-
font-size: 18px;
|
104
|
-
color: #2fadcf;
|
105
|
-
cursor: pointer;
|
106
|
-
}
|
107
|
-
|
108
|
-
div#head span:first-child {
|
109
|
-
padding-left: 12px;
|
110
|
-
-webkit-border-top-left-radius: 10px;
|
111
|
-
-webkit-border-bottom-left-radius: 10px;
|
112
|
-
-moz-border-radius-topleft: 10px;
|
113
|
-
-moz-border-radius-bottomleft: 10px;
|
114
|
-
border-top-left-radius: 10px;
|
115
|
-
border-bottom-left-radius: 10px;
|
116
|
-
}
|
117
|
-
|
118
|
-
div#head span:last-child {
|
119
|
-
padding-right: 12px;
|
120
|
-
-webkit-border-top-right-radius: 10px;
|
121
|
-
-webkit-border-bottom-right-radius: 10px;
|
122
|
-
-moz-border-radius-topright: 10px;
|
123
|
-
-moz-border-radius-bottomright: 10px;
|
124
|
-
border-top-right-radius: 10px;
|
125
|
-
border-bottom-right-radius: 10px;
|
126
|
-
}
|
127
|
-
|
128
|
-
h2,
|
129
|
-
h3 {
|
130
|
-
font-size: 18px;
|
131
|
-
color: #2fadcf;
|
132
|
-
margin: 25px 0 10px;
|
133
|
-
}
|
134
|
-
|
135
|
-
h2 span,
|
136
|
-
h3 span {
|
137
|
-
font-size: 13px;
|
138
|
-
color: #888;
|
139
|
-
}
|
140
|
-
|
141
|
-
ul.locales {
|
142
|
-
margin: 25px 0;
|
143
|
-
}
|
144
|
-
|
145
|
-
ul.locales li {
|
146
|
-
width: 300px;
|
147
|
-
display: block;
|
148
|
-
float: left;
|
149
|
-
margin: 0 10px 10px 0;
|
150
|
-
/* background: #fff;
|
151
|
-
-webkit-border-radius: 5px;
|
152
|
-
-moz-border-radius: 5px;
|
153
|
-
border-radius: 5px;
|
154
|
-
border: 1px solid #e5e5e5;
|
155
|
-
padding: 5px 10px;*/
|
156
|
-
}
|
157
|
-
|
158
|
-
ul.locales a {
|
159
|
-
font-weight: bold;
|
160
|
-
text-decoration: underline;
|
161
|
-
color: #2fadcf;
|
162
|
-
}
|
163
|
-
|
164
|
-
/*ul.locales li:hover {
|
165
|
-
background: #f5f5f5;
|
166
|
-
border-color: #ccc;
|
167
|
-
}*/
|
168
|
-
|
169
|
-
ul.locales span.missing_translations {
|
170
|
-
color: #fff;
|
171
|
-
font-weight: bold;
|
172
|
-
background: #c00;
|
173
|
-
font-size: 9px;
|
174
|
-
padding: 3px;
|
175
|
-
-webkit-border-radius: 3px;
|
176
|
-
-moz-border-radius: 3px;
|
177
|
-
border-radius: 3px;
|
178
|
-
line-height: 9px;
|
179
|
-
vertical-align: top;
|
180
|
-
display: inline-block;
|
181
|
-
}
|
182
|
-
|
183
|
-
ul.locales span {
|
184
|
-
font-size: 13px;
|
185
|
-
color: #666;
|
186
|
-
}
|
187
|
-
|
188
|
-
div.submit {
|
189
|
-
background: #f5f5f5;
|
190
|
-
margin: 25px -25px -25px;
|
191
|
-
padding: 15px 25px;
|
192
|
-
border-top: 1px dashed #ccc;
|
193
|
-
-webkit-border-bottom-right-radius: 20px;
|
194
|
-
-webkit-border-bottom-left-radius: 20px;
|
195
|
-
-moz-border-radius-bottomright: 20px;
|
196
|
-
-moz-border-radius-bottomleft: 20px;
|
197
|
-
border-bottom-right-radius: 20px;
|
198
|
-
border-bottom-left-radius: 20px;
|
199
|
-
}
|
200
|
-
|
201
|
-
span.updated {
|
202
|
-
font-size: 11px;
|
203
|
-
padding: 1px;
|
204
|
-
background: #ffc;
|
205
|
-
color: #777;
|
206
|
-
margin-bottom: 10px;
|
207
|
-
float: right;
|
208
|
-
}
|
209
|
-
|
210
|
-
div.table_submit {
|
211
|
-
background: #f5f5f5;
|
212
|
-
margin: -25px 0 0;
|
213
|
-
padding: 12px 15px 15px;
|
214
|
-
text-align: left;
|
215
|
-
}
|
216
|
-
|
217
|
-
div.table_submit input.save {
|
218
|
-
border: 0;
|
219
|
-
font-weight: bold;
|
220
|
-
text-decoration: none;
|
221
|
-
font-size: 18px;
|
222
|
-
color: #fff;
|
223
|
-
cursor: pointer;
|
224
|
-
border-radius: 10px;
|
225
|
-
padding: 8px 10px;
|
226
|
-
background: #444;
|
227
|
-
}
|
228
|
-
|
229
|
-
|
230
|
-
div.translations {
|
231
|
-
width: 96%;
|
232
|
-
text-align: center;
|
233
|
-
}
|
234
|
-
|
235
|
-
span.notice {
|
236
|
-
background: #ffc;
|
237
|
-
color: #666;
|
238
|
-
font-size: 12px;
|
239
|
-
padding: 2px 5px;
|
240
|
-
margin: -5px 0 15px;
|
241
|
-
display: inline-block;
|
242
|
-
}
|
243
|
-
|
244
|
-
div.previous {
|
245
|
-
color: #999;
|
246
|
-
margin: 5px 0;
|
247
|
-
padding: 1px 8px 4px;
|
248
|
-
}
|
249
|
-
|
250
|
-
div.updated {
|
251
|
-
background: #ffc;
|
252
|
-
padding: 1px 8px 4px;
|
253
|
-
}
|
254
|
-
|
255
|
-
table.translations div.previous span.key {
|
256
|
-
margin: 0 0 -2px;
|
257
|
-
padding: 0;
|
258
|
-
}
|
259
|
-
|
260
|
-
table.translations div.updated span.key {
|
261
|
-
margin: 0 0 -2px;
|
262
|
-
color: orange !important;
|
263
|
-
padding: 0;
|
264
|
-
}
|
265
|
-
|
266
|
-
/*-------------------------------------------------
|
267
|
-
Translation tables
|
268
|
-
-------------------------------------------------*/
|
269
|
-
|
270
|
-
table.translations {
|
271
|
-
margin: 0 0 25px;
|
272
|
-
width: 100%;
|
273
|
-
text-align: left;
|
274
|
-
}
|
275
|
-
|
276
|
-
table.translations td,
|
277
|
-
table.translations th {
|
278
|
-
font-size: 14px;
|
279
|
-
color: #222;
|
280
|
-
padding: 12px 8px;
|
281
|
-
border-bottom: 1px solid #e5e5e5;
|
282
|
-
vertical-align: top;
|
283
|
-
width: 48%;
|
284
|
-
}
|
285
|
-
|
286
|
-
table.translations th {
|
287
|
-
border-bottom-color: #bbb;
|
288
|
-
font-size: 11px;
|
289
|
-
font-weight: bold;
|
290
|
-
text-transform: uppercase;
|
291
|
-
color: #999;
|
292
|
-
padding-bottom: 2px;
|
293
|
-
}
|
294
|
-
|
295
|
-
table.translations th.actions {
|
296
|
-
width: 50px;
|
297
|
-
}
|
298
|
-
|
299
|
-
table.translations textarea.locale {
|
300
|
-
font-family: "Lucida Sans", "Lucida Grande", "Lucida Sans Unicode", sans-serif;
|
301
|
-
font-size: 14px;
|
302
|
-
line-height: 21px;
|
303
|
-
color: #222;
|
304
|
-
padding: 1px;
|
305
|
-
width: 100%;
|
306
|
-
height: 42px;
|
307
|
-
}
|
308
|
-
|
309
|
-
table.translations span.key {
|
310
|
-
color: #aaa;
|
311
|
-
font-size: 9px;
|
312
|
-
display: block;
|
313
|
-
}
|
314
|
-
|
315
|
-
table.translations td.translation {
|
316
|
-
padding: 10px 8px;
|
317
|
-
}
|
318
|
-
|
319
|
-
table.translations td.actions {
|
320
|
-
width: 50px;
|
321
|
-
text-align: center;
|
322
|
-
}
|
323
|
-
|
324
|
-
table.translations td.actions a {
|
325
|
-
font-weight: bold;
|
326
|
-
text-decoration: none;
|
327
|
-
}
|
328
|
-
|
329
|
-
table.translations td.actions .warning {
|
330
|
-
font-weight: bold;
|
331
|
-
font-size: 25px;
|
332
|
-
color: orange;
|
333
|
-
padding: 2px 4px;
|
334
|
-
display: none;
|
335
|
-
cursor: help;
|
336
|
-
}
|
337
|
-
|
338
|
-
table.translations tr.active td {
|
339
|
-
background: #edf9fe;
|
340
|
-
}
|
341
|
-
|
342
|
-
table.translations .highlight {
|
343
|
-
background-color: yellow;
|
344
|
-
}
|
345
|
-
|
346
|
-
table.translations .original textarea {
|
347
|
-
display: none;
|
348
|
-
}
|
349
|
-
|
350
|
-
table.translations .original .interpolation,
|
351
|
-
table.translations .original .carriage_return,
|
352
|
-
table.translations .original .boolean {
|
353
|
-
color: #2fadcf;
|
354
|
-
font-family: Courier, monospace;
|
355
|
-
font-weight: bold;
|
356
|
-
cursor: help;
|
357
|
-
}
|
358
|
-
|
359
|
-
table.translations .original .carriage_return:before {
|
360
|
-
content: "¶";
|
361
|
-
}
|
362
|
-
|
363
|
-
/*-------------------------------------------------
|
364
|
-
Pagination
|
365
|
-
-------------------------------------------------*/
|
366
|
-
|
367
|
-
div.paginate {
|
368
|
-
margin: 15px auto 20px;
|
369
|
-
font-size: 12px;
|
370
|
-
color: #777;
|
371
|
-
}
|
372
|
-
|
373
|
-
div.paginate a,
|
374
|
-
div.paginate span {
|
375
|
-
padding: 2px 6px;
|
376
|
-
text-decoration: none;
|
377
|
-
}
|
378
|
-
|
379
|
-
div.paginate a:hover,
|
380
|
-
div.paginate span.current {
|
381
|
-
-webkit-border-radius: 5px;
|
382
|
-
-moz-border-radius: 5px;
|
383
|
-
border-radius: 5px;
|
384
|
-
background: #eee;
|
385
|
-
color: #333;
|
386
|
-
}
|
387
|
-
|
388
|
-
div.paginate .next_page,
|
389
|
-
div.paginate .prev_page {
|
390
|
-
margin: 0 15px;
|
391
|
-
-webkit-border-radius: 5px;
|
392
|
-
-moz-border-radius: 5px;
|
393
|
-
border-radius: 5px;
|
394
|
-
border: 1px solid #bbb;
|
395
|
-
padding: 4px 8px;
|
396
|
-
}
|
397
|
-
|
398
|
-
div.paginate .disabled {
|
399
|
-
color: #ccc;
|
400
|
-
border-color: #eee;
|
401
|
-
}
|