decidim-term_customizer 0.16.5 → 0.16.6

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
  SHA256:
3
- metadata.gz: b9473c65d949ac1f1c14f152bad4cd0c04ffcff5f2a9ad377dc470f2af4fc256
4
- data.tar.gz: 64b870998a9239a6242ea2bd1ebe0ac1e00b1bcb9812d7b5bd3efa2618dbbb68
3
+ metadata.gz: d0adf060c3c243ebc5ac49b06b470a5ca036d6fe04ecee991775e5da5d464a65
4
+ data.tar.gz: eb46370b1bf5186def7e3aa10b7b93c50ac5704f858b665fe4dffb62de877261
5
5
  SHA512:
6
- metadata.gz: '08f642fc149b9d8664081607afe9fb167fcc42dc7f6e2f02a8b73c0a0efd746f2c015e0023d46b5e6d4241e342bb13dbf7a2e2087508c850060a44378435933f'
7
- data.tar.gz: c6648b9f8d3e89a7308d4b320a4bf96b6e09fa5d958a5005b343832534eae8c827d8171fa7a9f0bb669d9f6c350dcdb46bfc5b92986b39e3610ae0491d3ad944
6
+ metadata.gz: 42bff42d6fe263926813ed5f3e56822be28d4a483784d8097572a891e9a86152ff3ae3e432f4475fab443bb4a01f6ac65d6ae33d5474f155cbc3f095604c9ea6
7
+ data.tar.gz: 8e8c1cee2e2350183ee9bbf5e6f3f185f56eb5a720742526c3acd367ad10bf7d7bcfe5aa437c3aadad9d32e70cbb4ced5712cefdf00eccba68327cf988002f66
@@ -44,7 +44,7 @@ module Decidim
44
44
  key: key,
45
45
  locale: locale
46
46
  }
47
- next unless TermCustomizer::Translation.find_by(attrs).nil?
47
+ next unless form.translation_set.translations.find_by(attrs).nil?
48
48
 
49
49
  attrs.merge(value: I18n.t(key, locale: locale, default: ""))
50
50
  end
@@ -0,0 +1,81 @@
1
+ fr:
2
+ activemodel:
3
+ attributes:
4
+ constraint:
5
+ component_id: Composant
6
+ subject_id: Espace participatif
7
+ subject_manifest: Type d'espace participatif
8
+ translation:
9
+ key: Clé de traduction
10
+ value: terme modifié
11
+ translation_set:
12
+ name: Nom
13
+ decidim:
14
+ admin:
15
+ actions:
16
+ add_multiple_translations: Ajouter plusieurs
17
+ back: Retour
18
+ clear_cache: Purger le cache
19
+ new_translation_set: Nouveau jeu de traduction
20
+ new_translation: Nouvelle traduction
21
+ models:
22
+ translation_sets:
23
+ fields:
24
+ name: Nom
25
+ translations:
26
+ fields:
27
+ key: Clé de traduction
28
+ original_term: Terme original
29
+ term: terme modifié
30
+ titles:
31
+ translation_sets: Jeu de traductions
32
+ translations: Traductions
33
+ term_customizer:
34
+ admin:
35
+ add_translations:
36
+ index:
37
+ add: Ajouter
38
+ search: Rechercher
39
+ caches:
40
+ clear:
41
+ success: Cache purgé avec succès
42
+ translation_sets:
43
+ constraint_fields:
44
+ constraint: Contrainte
45
+ remove: Retirer
46
+ create:
47
+ success: Jeu de traduction créé avec succès.
48
+ error: Une erreur a lieu durant la création du jeu de traduction.
49
+ destroy:
50
+ success: Le jeu de traduction a été supprimé.
51
+ edit:
52
+ title: Jeu de traduction
53
+ save: Sauvegarder
54
+ form:
55
+ add_constraint: Ajouter contrainte
56
+ title: Jeu de traduction
57
+ new:
58
+ create: Créer
59
+ title: Jeu de traductions
60
+ update:
61
+ success: Jeu de traduction mis à jour avec succès.
62
+ error: Une erreur a lieu durant la mise à jour du jeu de traduction.
63
+ translations:
64
+ create:
65
+ success: Traduction créée avec succès.
66
+ error: Une erreur a lieu durant la création de la traduction.
67
+ destroy:
68
+ success: La traduction a été supprimée.
69
+ edit:
70
+ title: Traduction
71
+ save: Sauvegarder
72
+ form:
73
+ title: Traduction
74
+ new:
75
+ create: Créer
76
+ title: Traductions
77
+ update:
78
+ success: Traduction mis à jour avec succès.
79
+ error: Une erreur a lieu durant la mise à jour de la traduction.
80
+ menu:
81
+ term_customizer: Paramétrages des traductions
@@ -57,6 +57,29 @@ module Decidim
57
57
  # the resolver.
58
58
  def clear_cache
59
59
  Rails.cache.delete_matched("#{cache_key_base}/*")
60
+ rescue NotImplementedError
61
+ # Some cache store, such as `ActiveSupport::Cache::MemCacheStore` do not
62
+ # support `delete_matched`. Therefore, clear all the possibly existing
63
+ # cache keys manually for each space and component.
64
+
65
+ # Clear all the "organization" translation keys.
66
+ Rails.cache.delete(cache_key_base)
67
+
68
+ # Iterate over the participatory spaces and their components to manually
69
+ # clear the cached records for all of them.
70
+ Decidim.participatory_space_registry.manifests.each do |manifest|
71
+ manifest.model_class_name.constantize.all.each do |space|
72
+ Rails.cache.delete("#{cache_key_base}/space_#{space.id}")
73
+
74
+ next unless space.respond_to?(:components)
75
+
76
+ space.components.each do |component|
77
+ Rails.cache.delete(
78
+ "#{cache_key_base}/space_#{space.id}/component_#{component.id}"
79
+ )
80
+ end
81
+ end
82
+ end
60
83
  end
61
84
 
62
85
  private
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Decidim
4
4
  module TermCustomizer
5
- VERSION = "0.16.5"
5
+ VERSION = "0.16.6"
6
6
  DECIDIM_VERSION = "~> 0.16.0"
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-term_customizer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.5
4
+ version: 0.16.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Antti Hukkanen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-28 00:00:00.000000000 Z
11
+ date: 2019-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: decidim-admin
@@ -39,7 +39,27 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: 0.16.0
41
41
  - !ruby/object:Gem::Dependency
42
- name: decidim-dev
42
+ name: dalli
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '2.7'
48
+ - - ">="
49
+ - !ruby/object:Gem::Version
50
+ version: 2.7.10
51
+ type: :development
52
+ prerelease: false
53
+ version_requirements: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - "~>"
56
+ - !ruby/object:Gem::Version
57
+ version: '2.7'
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: 2.7.10
61
+ - !ruby/object:Gem::Dependency
62
+ name: decidim-consultations
43
63
  requirement: !ruby/object:Gem::Requirement
44
64
  requirements:
45
65
  - - "~>"
@@ -53,7 +73,7 @@ dependencies:
53
73
  - !ruby/object:Gem::Version
54
74
  version: 0.16.0
55
75
  - !ruby/object:Gem::Dependency
56
- name: decidim-participatory_processes
76
+ name: decidim-dev
57
77
  requirement: !ruby/object:Gem::Requirement
58
78
  requirements:
59
79
  - - "~>"
@@ -67,7 +87,7 @@ dependencies:
67
87
  - !ruby/object:Gem::Version
68
88
  version: 0.16.0
69
89
  - !ruby/object:Gem::Dependency
70
- name: decidim-proposals
90
+ name: decidim-participatory_processes
71
91
  requirement: !ruby/object:Gem::Requirement
72
92
  requirements:
73
93
  - - "~>"
@@ -81,7 +101,7 @@ dependencies:
81
101
  - !ruby/object:Gem::Version
82
102
  version: 0.16.0
83
103
  - !ruby/object:Gem::Dependency
84
- name: decidim-consultations
104
+ name: decidim-proposals
85
105
  requirement: !ruby/object:Gem::Requirement
86
106
  requirements:
87
107
  - - "~>"
@@ -149,6 +169,7 @@ files:
149
169
  - config/locales/en.yml
150
170
  - config/locales/es.yml
151
171
  - config/locales/fi.yml
172
+ - config/locales/fr.yml
152
173
  - config/locales/sv.yml
153
174
  - db/migrate/20190217132503_create_decidim_term_customizer_translation_sets.rb
154
175
  - db/migrate/20190217132654_create_decidim_term_customizer_translations.rb