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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e35fc3d32a34b9dde3097192bd791ffb50b8d62a68b1520347da4ed2ac72224f
4
- data.tar.gz: decad482b4b5f99fedf070f2f64fb655f088ab6397f709a5362623f59570342d
3
+ metadata.gz: 3b0cf11a752999e4dbbbc5d4052c919e98958a4cfc9a289b4bada123f9138574
4
+ data.tar.gz: adc607000e536c7858b0b3ab1d3071995575bc7482f7d7c97692a3b90f4a9997
5
5
  SHA512:
6
- metadata.gz: 2a652e6a3725561e8b5455b6676a490d214aff84f78163b5ab02385a4708381e80cdb8125782b1cb36eab9ae386384768e0231a7e988cf637ddbf464a8ff62d8
7
- data.tar.gz: d4e980bb9d34168a802660b918bf3d092cf6b9be3b62d1b81696aa3d9ee5d026dcb335e4993fa6ca55a9b4964d58a82eaefd7d6fbedd8eae64ede2a99391519b
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.international(attr => value, locale: locale)
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?
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Internationalize
4
- VERSION = "0.5.0"
4
+ VERSION = "0.5.1"
5
5
  end
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.0
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.7.2
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: []