internationalize 0.5.0 → 0.5.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 +4 -4
- data/CHANGELOG.md +15 -0
- data/lib/internationalize/validations.rb +1 -1
- data/lib/internationalize/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3b0cf11a752999e4dbbbc5d4052c919e98958a4cfc9a289b4bada123f9138574
|
|
4
|
+
data.tar.gz: adc607000e536c7858b0b3ab1d3071995575bc7482f7d7c97692a3b90f4a9997
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 61a9c88a71bf96370975b5c1f0163b668ff45163f8c75cc0e151518c992866b2194846081a2259ac876e6ce9eb4ff1a38d2ad9628069f421b4232c2ca377d835
|
|
7
|
+
data.tar.gz: 946c06a56af45762973f109a50c132573fbdef72fa26c900ca1478bdacd4f945dfb58e670683bbd9bbdb68a9bfeda1a732ab3913178875be518eb8bd172f67cd
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.5.1] - 2025-01-27
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- `validates_international` uniqueness validation now uses `i18n_where` instead of deprecated `international` method
|
|
13
|
+
- Eliminates deprecation warnings when using `validates_international :attr, uniqueness: true`
|
|
14
|
+
|
|
15
|
+
## [0.5.0] - 2025-12-03
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- `validates_international` now adds errors to the base attribute (e.g., `:title`) instead of locale-suffixed attributes (e.g., `:title_en`)
|
|
20
|
+
- This produces cleaner user-facing messages: "Title has already been taken" instead of "Title en has already been taken"
|
|
21
|
+
- For admin interfaces needing locale-specific error keys, use custom validations (see README)
|
|
22
|
+
|
|
8
23
|
## [0.4.0] - 2025-12-02
|
|
9
24
|
|
|
10
25
|
### Added
|
|
@@ -72,7 +72,7 @@ module Internationalize
|
|
|
72
72
|
value = record.send("#{attr}_#{locale}")
|
|
73
73
|
next if value.blank?
|
|
74
74
|
|
|
75
|
-
scope = record.class.
|
|
75
|
+
scope = record.class.i18n_where(attr => value, locale: locale)
|
|
76
76
|
scope = scope.where.not(id: record.id) if record.persisted?
|
|
77
77
|
|
|
78
78
|
if scope.exists?
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: internationalize
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sampo Kuokkanen
|
|
@@ -87,7 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
87
87
|
- !ruby/object:Gem::Version
|
|
88
88
|
version: '0'
|
|
89
89
|
requirements: []
|
|
90
|
-
rubygems_version: 3.
|
|
90
|
+
rubygems_version: 3.6.9
|
|
91
91
|
specification_version: 4
|
|
92
92
|
summary: Lightweight, performant i18n for Rails with JSON column storage
|
|
93
93
|
test_files: []
|