vulgata 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b64cbe5415ae250367f395825a16a8253407b503
4
- data.tar.gz: 1d614834820c275bf417d4ec7006d7fc0c87e8eb
3
+ metadata.gz: de1ee51b43ced1a7a082d26fcd655162ed6a1258
4
+ data.tar.gz: d9ecf142d1401efcb0c0f234c43a8e531e5715dd
5
5
  SHA512:
6
- metadata.gz: 230db35f3ca23d8be01ef34cbbf820de2a45c14709c2ca7ac5ca702d6d92ce2f9eaa8b0691d6a7157b63428d213c4c4d8cc7a4536417da6103096e59bd202c5d
7
- data.tar.gz: 464fff65e1a9e1250753b07bfd1a24f23e3c4f88da0f7fb739cadfce9ce2c199600904ef1e54fd9d099fa421a602462b17a4af18bb3b0d0f668ae2de944e3379
6
+ metadata.gz: 828b9fd15eb3ad4a20a6e9be0ace0a48f6feb1c1b5866c6254d7a9659efd650b2fc357f4f8586c5890e0a3e749d2313d648b00dcdfd53ebf0a70d376bdd98b0a
7
+ data.tar.gz: 315b4827c7509bf9dfcc5db7f44e3991386d671c25b67e649b3bfb33391a7fa40b8b26efce6c9d759b34a047c0981a7997d4bd67525799f1d0c28a737d51d5c0
@@ -19,13 +19,21 @@
19
19
  </thead>
20
20
  <tbody>
21
21
  <% @keys_to_translate.each do |k| %>
22
+ <% if form && @source_translation[k].blank? %>
23
+ <%# this is a hidden textarea- usfull in some cases (i.e. spliting text by lines and keeping the empty lines )%>
24
+ <%= text_area_tag "resource[#{k}]", @source_translation[k].present? ? @translation[k] : '', readonly: @source_translation[k].blank?, class: "hidden", required: @source_translation[k].present?, rows: @source_translation[k].present? ? @source_translation[k].lines.count : "1", data: { src_val: @source_translation[k], src_locale: @source_translation_state.locale, dst_locale: @translation_state.locale } %>
25
+ <% next %>
26
+ <% elsif @source_translation[k].blank? %>
27
+ <% next %>
28
+ <% end %>
29
+
22
30
  <tr>
23
31
  <td><%= k %></td>
24
32
  <td class="source-translation-area"><%= @source_translation[k] %></td>
25
33
  <% if form %>
26
34
  <td><%= text_area_tag "resource[#{k}]", @source_translation[k].present? ? @translation[k] : '', readonly: @source_translation[k].blank?, class: "form-control translation-area", required: @source_translation[k].present?, rows: @source_translation[k].present? ? @source_translation[k].lines.count : "1", data: { src_val: @source_translation[k], src_locale: @source_translation_state.locale, dst_locale: @translation_state.locale } %></td>
27
35
  <% else %>
28
- <td><%= @translation[k] %></span></td>
36
+ <td><%= @translation[k] %></td>
29
37
  <% end %>
30
38
  </tr>
31
39
  <% end %>
@@ -42,8 +42,7 @@ module VulgataMethods
42
42
  end
43
43
 
44
44
  def vulgata_preprocess_setter data
45
- existing_data = data.delete_if { |k, v| v.blank? }
46
- self.vlg_preprocess_setter.blank? ? existing_data : self.send(self.vlg_preprocess_setter, existing_data)
45
+ self.vlg_preprocess_setter.blank? ? data.delete_if { |k, v| v.blank? } : self.send(self.vlg_preprocess_setter, data)
47
46
  end
48
47
 
49
48
  def vulgata_preprocess_getter data
@@ -1,3 +1,3 @@
1
1
  module Vulgata
2
- VERSION = "0.3.3"
2
+ VERSION = "0.3.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vulgata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Gehtman
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-05-16 00:00:00.000000000 Z
12
+ date: 2017-05-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails