inertia_i18n 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: b731d8c8bfdf6ab6f73dceeadc53172e60170786f29922b75f2997dec846cd36
4
- data.tar.gz: e0ea7396c3b10eb6ed4747e9b1deae9ecaa9e037e1922bbd67241cdf19712534
3
+ metadata.gz: 233834d7267d92e29c7209378f7acfcec0eeb9e8caf0f5605e4940fff5206c58
4
+ data.tar.gz: 18e927a425cc0d03d050f06f9c1a9e9e26900026ae8b84a3338d30f81d8ce80b
5
5
  SHA512:
6
- metadata.gz: 664b563f1ca6c78234c7db86849f4bb6da97ced5a21480bd494e3d8177d4a8204f5bc1378eefe58c4e9e398572135409fab80c7ad8c8fbf4010898f6d0bfbd11
7
- data.tar.gz: ae0cca0e3409bb8665a732d4d4e071c2538f935c1d3bba54349315889b7787ccc96d0d4a5dacef2ef8cf8b15221226f015145d6068eb5e2936910b66ff562fbb
6
+ metadata.gz: f941c6526e672ee6ece9659470b6d16c408e84c3e5a58f13afe2776fb7eb6df1ff63cf2b083c196fede0093fd902c1861f7a5b24dd508008884907183e45a15b
7
+ data.tar.gz: 762bb697ad13c286d438fe923cde68bad3cf3e0e9cdeb6f1aa1042eb083850f1ca716fe6b0d801809879cad59c18eb198d1b1105c6cf06877a5d8742d1070070
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.4.1] - 2026-02-05
4
+
5
+ ### Changed
6
+
7
+ - Default `config.locales` now uses `I18n.available_locales` instead of hardcoded `[:en]`
8
+ - Generated initializer shows commented example for overriding locales
9
+
3
10
  ## [0.4.0] - 2026-01-28
4
11
 
5
12
  ### Added
data/README.md CHANGED
@@ -92,7 +92,9 @@ InertiaI18n.configure do |config|
92
92
  config.source_paths = [Rails.root.join('config', 'locales', 'frontend')]
93
93
 
94
94
  config.target_path = Rails.root.join('app', 'frontend', 'locales')
95
- config.locales = [:en, :ru]
95
+
96
+ # Uses I18n.available_locales by default. Uncomment to override:
97
+ # config.locales = [:en, :ru]
96
98
 
97
99
  # Scan paths are automatically set based on your detected framework
98
100
  config.scan_paths = [
@@ -329,8 +331,8 @@ InertiaI18n.configure do |config|
329
331
  # Target: i18next JSON files
330
332
  config.target_path = 'app/frontend/locales'
331
333
 
332
- # Locales to process
333
- config.locales = [:en, :ru, :de]
334
+ # Locales to process (uses I18n.available_locales by default)
335
+ # config.locales = [:en, :ru, :de]
334
336
 
335
337
  # Frontend paths to scan
336
338
  config.scan_paths = [
@@ -8,7 +8,8 @@ InertiaI18n.configure do |config|
8
8
  config.target_path = Rails.root.join("app", "frontend", "locales")
9
9
 
10
10
  # Locales to process (first is primary)
11
- config.locales = %i[en]
11
+ # Uses I18n.available_locales by default. Uncomment to override:
12
+ # config.locales = %i[en ru]
12
13
 
13
14
  # YAML file pattern to match
14
15
  config.source_pattern = "**/*.{yml,yaml}"
@@ -9,7 +9,11 @@ module InertiaI18n
9
9
  attr_accessor :target_path
10
10
 
11
11
  # Locales to process (first is primary)
12
- attr_accessor :locales
12
+ attr_writer :locales
13
+
14
+ def locales
15
+ @locales || I18n.available_locales
16
+ end
13
17
 
14
18
  # YAML file pattern to match
15
19
  attr_accessor :source_pattern
@@ -47,7 +51,7 @@ module InertiaI18n
47
51
  def initialize
48
52
  @source_paths = ["config/locales/frontend"]
49
53
  @target_path = "app/frontend/locales"
50
- @locales = %i[en]
54
+ @locales = nil # Uses I18n.available_locales by default
51
55
  @source_pattern = "**/*.{yml,yaml}"
52
56
  @interpolation = {from: "%{", to: "{{"}
53
57
  @scan_paths = ["app/frontend/**/*.{js,ts,jsx,tsx,svelte,vue}"]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module InertiaI18n
4
- VERSION = "0.4.0"
4
+ VERSION = "0.4.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inertia_i18n
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
  - Alexey Poimtsev
@@ -196,7 +196,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
196
196
  - !ruby/object:Gem::Version
197
197
  version: '0'
198
198
  requirements: []
199
- rubygems_version: 4.0.4
199
+ rubygems_version: 4.0.5
200
200
  specification_version: 4
201
201
  summary: Translation management for Inertia.js applications
202
202
  test_files: []