moirai 0.4.0 → 0.4.1

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
  SHA256:
3
- metadata.gz: 95cf427b4c903e4a772cad00b3165fc9a285d019678870996d6afd122ff9c4bf
4
- data.tar.gz: ae20e09390c869f1971f309c2e049fddce6557f0122069175d7f9886e8719ea1
3
+ metadata.gz: c5a4c92d52a38c7cbae4d8216b9421d15f6b2db58328ef8f8df5b46da0c97785
4
+ data.tar.gz: c23ab52e4a50ee7478abdf41cee44fe04daa7760c1f69179cc7195ca58f70ead
5
5
  SHA512:
6
- metadata.gz: cd8ead3d31114b762f706f115102bc8f36f4d1d9082911e34ac37ac57ab26d9ebb1621c57f4bf3d91626b0e3ddac67d96ca65b60e0e239650b824b4d2bac64bd
7
- data.tar.gz: 0db74b1d99fcd721b378ff9371f2342051f022e4bdd02023d04c73516733f3f76a091d65ad4f653d4411c17819e3a40d675605c4eee29c4622ac88b3aba43ee1
6
+ metadata.gz: 1afbdd4d152ddc16ce221e2918092feb2a0e2437af4bce78163b5b2fc9973ebe504b8f42650ffebe56b982f3f646c0602cd9b50c68e17b48c08552b7eed26fd8
7
+ data.tar.gz: 78dfa1fafe07d6a51ee10d3afe111767d3ede63cb254b408c44745369aa5a27c5e84922f613e4b7ccdfe8610aa9f7894fe6d07f8f833404c8d0a40a1b90da5bd
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.4.1
2
+
3
+ * Fix bug when the string is not a string, but a boolean
4
+
1
5
  ## 0.4.0 - Breaking Changes ⚠️
2
6
 
3
7
  * Inline editing is now disabled by default. To enable it, specify the following in `application.rb`:
@@ -4,8 +4,8 @@ module ActionView::Helpers::TranslationHelper # rubocop:disable Lint/ConstantDef
4
4
  def translate(key, **)
5
5
  value = original_translate(key, **)
6
6
 
7
- is_missing_translation = value.include?('class="translation_missing"')
8
- if value.is_a?(String) && is_missing_translation
7
+ is_missing_translation = value.is_a?(String) && value.include?('class="translation_missing"')
8
+ if is_missing_translation
9
9
  value = extract_inner_content(value)
10
10
  end
11
11
 
@@ -25,7 +25,7 @@ module ActionView::Helpers::TranslationHelper # rubocop:disable Lint/ConstantDef
25
25
  alias_method :t, :translate
26
26
 
27
27
  def moirai_edit_enabled?
28
- Moirai.enable_inline_editing.call(params: params || {})
28
+ Moirai.enable_inline_editing.call(params: defined?(params) ? params : {})
29
29
  end
30
30
 
31
31
  private
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Moirai
4
- VERSION = "0.4.0"
4
+ VERSION = "0.4.1"
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moirai
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alessandro Rodi
8
8
  - Oliver Anthony
9
9
  - Daniel Bengl
10
- autorequire:
10
+ autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
13
  date: 2024-11-26 00:00:00.000000000 Z
@@ -98,7 +98,7 @@ metadata:
98
98
  changelog_uri: https://github.com/renuo/moirai/CHANGELOG.md
99
99
  steep_types: sig
100
100
  rubygems_mfa_required: 'true'
101
- post_install_message:
101
+ post_install_message:
102
102
  rdoc_options: []
103
103
  require_paths:
104
104
  - lib
@@ -113,8 +113,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
113
113
  - !ruby/object:Gem::Version
114
114
  version: '0'
115
115
  requirements: []
116
- rubygems_version: 3.5.22
117
- signing_key:
116
+ rubygems_version: 3.4.7
117
+ signing_key:
118
118
  specification_version: 4
119
119
  summary: Manage translation strings in real time
120
120
  test_files: []