magic_locales 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/locales/mgcl.de.yml +19 -0
- data/config/locales/mgcl.en.yml +19 -0
- data/lib/app/views/magic_locales/locales/index.html.erb +21 -16
- data/lib/magic_locales/version.rb +1 -1
- data/lib/magic_locales.rb +2 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8df4284162c4f82a9c62f7898a892741d57f2cb7
|
4
|
+
data.tar.gz: ea2757b8008488b3503e4766ff31073df15baea5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa7b5bf71ba840f1a74da6136ff92c002144fe1f7fc9d6453ea11e41f99a5610a000efff7be203c913363f756d8a6fa389b12eaed401669d66aefd9db0fca265
|
7
|
+
data.tar.gz: cb3faf4cd0a831427999872452eebec243c022c1d6ca8e609c62851a9e97a5fb6eae532c117eba1baeefa35412b22b0bc40a1df2fe53438858322eaeb11e881f
|
data/config/locales/mgcl.de.yml
CHANGED
@@ -1,4 +1,19 @@
|
|
1
1
|
de:
|
2
|
+
magic_locales:
|
3
|
+
available_locales: "Verfügbare Sprachen"
|
4
|
+
available_locales_helper: "Sprachen die als *.yml Datei im System vorliegen, Fragen Sie Ihren Admin für mehr Informationen."
|
5
|
+
main_locale: "Master"
|
6
|
+
trigger: "Optionen"
|
7
|
+
available: "Verfügbar"
|
8
|
+
actions: "Aktionen"
|
9
|
+
availables:
|
10
|
+
"true": "Ja"
|
11
|
+
"false": "NEIN"
|
12
|
+
triggers:
|
13
|
+
activate: "Aktivieren"
|
14
|
+
release: "Veröffentlichen"
|
15
|
+
deactivate: "Deaktivieren"
|
16
|
+
edit: "bearbeiten"
|
2
17
|
helpers:
|
3
18
|
label:
|
4
19
|
language:
|
@@ -19,6 +34,10 @@ de:
|
|
19
34
|
natural_name: "Natürlich"
|
20
35
|
iso_code: "ISO-Code"
|
21
36
|
locale_state: "Status"
|
37
|
+
states:
|
38
|
+
inactive: "Inaktiv"
|
39
|
+
active: "Aktiv"
|
40
|
+
live: "Online"
|
22
41
|
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
23
42
|
placeholder:
|
24
43
|
choose_language: "Sprache Wählen"
|
data/config/locales/mgcl.en.yml
CHANGED
@@ -1,4 +1,19 @@
|
|
1
1
|
de:
|
2
|
+
magic_locales:
|
3
|
+
available_locales: "Verfügbare Sprachen"
|
4
|
+
available_locales_helper: "Locales that are available as *.yml files in the system, ask your admin for more informations."
|
5
|
+
main_locale: "main"
|
6
|
+
trigger: "triggers"
|
7
|
+
available: "available"
|
8
|
+
actions: "Actions"
|
9
|
+
availables:
|
10
|
+
"true": "Yes"
|
11
|
+
"false": "NO!"
|
12
|
+
triggers:
|
13
|
+
activate: "activate"
|
14
|
+
release: "release"
|
15
|
+
deactivate: "deactivate"
|
16
|
+
edit: "edit"
|
2
17
|
helpers:
|
3
18
|
label:
|
4
19
|
language:
|
@@ -19,6 +34,10 @@ de:
|
|
19
34
|
natural_name: "Natural"
|
20
35
|
iso_code: "ISO-Code"
|
21
36
|
locale_state: "State"
|
37
|
+
states:
|
38
|
+
inactive: "Inactive"
|
39
|
+
active: "Active"
|
40
|
+
live: "Online"
|
22
41
|
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
23
42
|
placeholder:
|
24
43
|
choose_language: "Choose language"
|
@@ -2,29 +2,32 @@
|
|
2
2
|
|
3
3
|
<%= content_for :headline do %>
|
4
4
|
|
5
|
-
<%= link_to "
|
6
|
-
<i class="
|
5
|
+
<%= link_to "+ #{t("activerecord.attributes.magic_locales_locale.one")}", url_for( controller: "magic_locales/locales", action: :new), class: "btn btn-success pull-right btn-sm", data: { toggle: "modal", target: "#appModal" } %>
|
6
|
+
<i class="icon-bubbles"></i> <%= t("activerecord.attributes.magic_locales_locale.other") %>
|
7
7
|
|
8
8
|
<% end %>
|
9
9
|
|
10
10
|
|
11
11
|
<h4>
|
12
|
-
<strong
|
12
|
+
<strong><%= t("magic_locales.available_locales") %></strong>
|
13
13
|
<% I18n.available_locales.each do |al| %>
|
14
14
|
<span class="label label-default"><%= al %></span>
|
15
15
|
<% end %>
|
16
16
|
</h4>
|
17
|
+
<p><%= t("magic_locales.available_locales_helper") %></p>
|
17
18
|
<div class="clearfix"></div>
|
18
19
|
<hr/>
|
19
20
|
<table class="table table-striped">
|
20
21
|
<thead>
|
21
22
|
<tr>
|
22
|
-
|
23
|
-
<th
|
24
|
-
<th
|
25
|
-
<th
|
26
|
-
<th
|
27
|
-
<th
|
23
|
+
|
24
|
+
<th><%= t("helpers.label.magic_locales_language.iso_code") %></th>
|
25
|
+
<th><%= t("helpers.label.magic_locales_language.name") %></th>
|
26
|
+
<th><%= t("helpers.label.magic_locales_language.locale_state") %></th>
|
27
|
+
<th><%= t("magic_locales.available") %></th>
|
28
|
+
<th><%= t("magic_locales.trigger") %></th>
|
29
|
+
<th><%= t("magic_locales.actions") %></th>
|
30
|
+
|
28
31
|
</tr>
|
29
32
|
</thead>
|
30
33
|
<tbody>
|
@@ -44,29 +47,31 @@
|
|
44
47
|
<td>
|
45
48
|
<%= locale_flag( locale.iso_code, "small" ) %>
|
46
49
|
<%= locale.iso_code %>
|
50
|
+
</td>
|
51
|
+
<td><strong><%= locale.name %></strong></td>
|
52
|
+
<td>
|
53
|
+
<%= t("helpers.label.magic_locales_language.states.#{locale.locale_state}") %>
|
47
54
|
<% if I18n.default_locale.to_s == locale.iso_code %>
|
48
55
|
|
49
|
-
<span class="label label-success"
|
56
|
+
<span class="label label-success"><%= t("magic_locales.main_locale") %></span>
|
50
57
|
<% end %>
|
51
58
|
</td>
|
52
|
-
<td><strong><%= locale.name %></strong></td>
|
53
|
-
<td><%= t("helpers.label.wizard_locale.states.#{locale.locale_state}") %></td>
|
54
59
|
<td>
|
55
60
|
<% if I18n.available_locales.include?(locale.iso_code.to_sym) %>
|
56
|
-
<span class="text-success"
|
61
|
+
<span class="text-success"><%= t("magic_locales.availables.true") %></span>
|
57
62
|
<% else %>
|
58
|
-
<span class="text-danger"
|
63
|
+
<span class="text-danger"><%= t("magic_locales.availables.false") %></span>
|
59
64
|
<% end %>
|
60
65
|
</td>
|
61
66
|
<td>
|
62
67
|
<% %w(activate release deactivate).each do |state| %>
|
63
68
|
<% if locale.state.trigger?(state.to_sym) %>
|
64
|
-
<%= link_to state
|
69
|
+
<%= link_to t("magic_locales.triggers.#{state}"), url_for( controller: "magic_locales/locales", action: :trigger, id: locale, state: state), class: "btn btn-default btn-sm" %>
|
65
70
|
<% end %>
|
66
71
|
<% end %>
|
67
72
|
</td>
|
68
73
|
<td>
|
69
|
-
<%= link_to "edit", url_for( controller: "magic_locales/locales", action: :edit, id: locale), class: "btn btn-default btn-sm", data: { toggle: "modal", target: "#appModal" } %>
|
74
|
+
<%= link_to t("magic_locales.edit"), url_for( controller: "magic_locales/locales", action: :edit, id: locale), class: "btn btn-default btn-sm", data: { toggle: "modal", target: "#appModal" } %>
|
70
75
|
</td>
|
71
76
|
</tr>
|
72
77
|
<% end %>
|
data/lib/magic_locales.rb
CHANGED
@@ -42,7 +42,8 @@ ActiveSupport.on_load(:active_record) do
|
|
42
42
|
require 'micromachine'
|
43
43
|
end
|
44
44
|
|
45
|
-
ActionController::Base.prepend_view_path File.expand_path '../app/views', __FILE__
|
45
|
+
# ActionController::Base.prepend_view_path File.expand_path '../app/views', __FILE__
|
46
|
+
ActionController::Base.append_view_path File.expand_path '../app/views', __FILE__
|
46
47
|
|
47
48
|
ActiveRecord::Base.send :include, MagicLocales::Association
|
48
49
|
|