magic_locales 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 63b61cb86ddb3625e2ed8a7a7ad847bf586aaac6
4
- data.tar.gz: 50c1f4c9c4bd6e30c7cb06494f0bd02d2c872624
3
+ metadata.gz: 8df4284162c4f82a9c62f7898a892741d57f2cb7
4
+ data.tar.gz: ea2757b8008488b3503e4766ff31073df15baea5
5
5
  SHA512:
6
- metadata.gz: 24f2f80f1652640c9c71b96810d4c58623a23a96686df952ffdd73c9b2c0c744deced5d299d29cfa9aa3dcb2b69bb5b4b2d728085a72df4cf7a6c6f31ee2c48b
7
- data.tar.gz: 70cfbbc607e139d867b4f128f6a66971dded3aabb0881a252f34d948ac33aeb6da55670e3275ed7b1edde64a1cc460ac100fb632c2a818d7d6f34cf18606ea05
6
+ metadata.gz: fa7b5bf71ba840f1a74da6136ff92c002144fe1f7fc9d6453ea11e41f99a5610a000efff7be203c913363f756d8a6fa389b12eaed401669d66aefd9db0fca265
7
+ data.tar.gz: cb3faf4cd0a831427999872452eebec243c022c1d6ca8e609c62851a9e97a5fb6eae532c117eba1baeefa35412b22b0bc40a1df2fe53438858322eaeb11e881f
@@ -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"
@@ -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 "New Locale", url_for( controller: "magic_locales/locales", action: :new), class: "btn btn-success pull-right btn-sm", data: { toggle: "modal", target: "#appModal" } %>
6
- <i class="magicons-user-group-round"></i> <%= t("activerecord.attributes.wizard_locale.other") %>
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>Available Locales:</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
- <th>ISO-Code</th>
23
- <th>Name</th>
24
- <th>State</th>
25
- <th>Available?</th>
26
- <th>Triggers</th>
27
- <th>Actions</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
  &nbsp;&nbsp;
49
- <span class="label label-success">main</span>
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">Yeah!</span>
61
+ <span class="text-success"><%= t("magic_locales.availables.true") %></span>
57
62
  <% else %>
58
- <span class="text-danger">Not Available!</span>
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.to_s.titleize, url_for( controller: "magic_locales/locales", action: :trigger, id: locale, state: state), class: "btn btn-default btn-sm" %>
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 %>
@@ -1,3 +1,3 @@
1
1
  module MagicLocales
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: magic_locales
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Torsten Wetzel