decidim-core 0.15.1 → 0.15.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of decidim-core might be problematic. Click here for more details.

@@ -9,7 +9,6 @@ uk:
9
9
  about: Про учасника
10
10
  email: Адреса вашої електронної пошти
11
11
  name: Ваше ім’я
12
- nickname: Ваш короткий, унікальний псевдонім
13
12
  password: Пароль
14
13
  password_confirmation: Підтвердьте свій пароль
15
14
  personal_url: Особиста веб-адреса
@@ -28,11 +27,6 @@ uk:
28
27
  password_confirmation: Підтвердження паролю
29
28
  remember_me: Запам'ятати мене
30
29
  models:
31
- decidim/user:
32
- one: Учасник
33
- few: Учасників
34
- many: Учасників
35
- other: Учасників
36
30
  decidim/user_group:
37
31
  one: Гурт учасників
38
32
  few: Гурти учасників
@@ -185,11 +179,6 @@ uk:
185
179
  ok: Гаразд
186
180
  title: Недостатньо прав через відсутність підтвердження особи
187
181
  collapsible_list:
188
- hidden_elements_count:
189
- one: і ще 1
190
- few: і ще %{count}
191
- many: і ще %{count}
192
- other: і ще %{count}
193
182
  see_less: "(читати менше)"
194
183
  see_more: "(читати далі)"
195
184
  components:
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds the decidim-core version.
5
5
  module Core
6
6
  def self.version
7
- "0.15.1"
7
+ "0.15.2"
8
8
  end
9
9
  end
10
10
  end
@@ -36,13 +36,7 @@ module Decidim
36
36
  #
37
37
  # Renders form fields for each locale.
38
38
  def translated(type, name, options = {})
39
- if locales.count == 1
40
- return send(
41
- type,
42
- "#{name}_#{locales.first.to_s.gsub("-", "__")}",
43
- options.merge(label: options[:label] || label_for(name))
44
- )
45
- end
39
+ return translated_one_locale(type, name, locales.first, options.merge(label: (options[:label] || label_for(name)))) if locales.count == 1
46
40
 
47
41
  tabs_id = sanitize_tabs_selector(options[:tabs_id] || "#{object_name}-#{name}-tabs")
48
42
 
@@ -72,7 +66,7 @@ module Decidim
72
66
  tab_content_id = "#{tabs_id}-#{name}-panel-#{index}"
73
67
  string + content_tag(:div, class: tab_element_class_for("panel", index), id: tab_content_id) do
74
68
  if options[:hashtaggable]
75
- hashtaggable_text_field(type, name, locale, options)
69
+ hashtaggable_text_field(type, name, locale, options.merge(label: false))
76
70
  else
77
71
  send(type, name_with_locale(name, locale), options.merge(label: false))
78
72
  end
@@ -83,6 +77,15 @@ module Decidim
83
77
  safe_join [label_tabs, tabs_content]
84
78
  end
85
79
 
80
+ def translated_one_locale(type, name, locale, options = {})
81
+ return hashtaggable_text_field(type, name, locale, options.merge(value: options[:value])) if options[:hashtaggable]
82
+ send(
83
+ type,
84
+ "#{name}_#{locale.to_s.gsub("-", "__")}",
85
+ options.merge(label: options[:label] || label_for(name))
86
+ )
87
+ end
88
+
86
89
  # Public: Generates a field for hashtaggable type.
87
90
  # type - The form field's type, like `text_area` or `text_input`
88
91
  # name - The name of the field
@@ -93,9 +96,9 @@ module Decidim
93
96
  def hashtaggable_text_field(type, name, locale, options = {})
94
97
  content_tag(:div, class: "hashtags__container") do
95
98
  if options[:value]
96
- send(type, name_with_locale(name, locale), options.merge(label: false, value: options[:value][locale]))
99
+ send(type, name_with_locale(name, locale), options.merge(label: options[:label], value: options[:value][locale]))
97
100
  else
98
- send(type, name_with_locale(name, locale), options.merge(label: false))
101
+ send(type, name_with_locale(name, locale), options.merge(label: options[:label]))
99
102
  end
100
103
  end
101
104
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.1
4
+ version: 0.15.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josep Jaume Rey Peroy
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2018-11-23 00:00:00.000000000 Z
13
+ date: 2019-01-08 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: active_link_to
@@ -690,28 +690,28 @@ dependencies:
690
690
  requirements:
691
691
  - - '='
692
692
  - !ruby/object:Gem::Version
693
- version: 0.15.1
693
+ version: 0.15.2
694
694
  type: :runtime
695
695
  prerelease: false
696
696
  version_requirements: !ruby/object:Gem::Requirement
697
697
  requirements:
698
698
  - - '='
699
699
  - !ruby/object:Gem::Version
700
- version: 0.15.1
700
+ version: 0.15.2
701
701
  - !ruby/object:Gem::Dependency
702
702
  name: decidim-dev
703
703
  requirement: !ruby/object:Gem::Requirement
704
704
  requirements:
705
705
  - - '='
706
706
  - !ruby/object:Gem::Version
707
- version: 0.15.1
707
+ version: 0.15.2
708
708
  type: :development
709
709
  prerelease: false
710
710
  version_requirements: !ruby/object:Gem::Requirement
711
711
  requirements:
712
712
  - - '='
713
713
  - !ruby/object:Gem::Version
714
- version: 0.15.1
714
+ version: 0.15.2
715
715
  description: Adds core features so other engines can hook into the framework.
716
716
  email:
717
717
  - josepjaume@gmail.com
@@ -1449,10 +1449,12 @@ files:
1449
1449
  - config/locales/es-PY.yml
1450
1450
  - config/locales/es.yml
1451
1451
  - config/locales/eu.yml
1452
+ - config/locales/fi-pl.yml
1452
1453
  - config/locales/fi.yml
1453
1454
  - config/locales/fr.yml
1454
1455
  - config/locales/gl.yml
1455
1456
  - config/locales/hu.yml
1457
+ - config/locales/id-ID.yml
1456
1458
  - config/locales/it.yml
1457
1459
  - config/locales/nl.yml
1458
1460
  - config/locales/pl.yml
@@ -1460,6 +1462,7 @@ files:
1460
1462
  - config/locales/pt.yml
1461
1463
  - config/locales/ru.yml
1462
1464
  - config/locales/sv.yml
1465
+ - config/locales/tr-TR.yml
1463
1466
  - config/locales/uk.yml
1464
1467
  - config/routes.rb
1465
1468
  - db/migrate/20160817115213_devise_create_decidim_users.rb
@@ -1795,7 +1798,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1795
1798
  version: '0'
1796
1799
  requirements: []
1797
1800
  rubyforge_project:
1798
- rubygems_version: 2.7.6
1801
+ rubygems_version: 2.7.7
1799
1802
  signing_key:
1800
1803
  specification_version: 4
1801
1804
  summary: The core of the Decidim framework.