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 +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +5 -3
- data/lib/generators/inertia_i18n/templates/inertia_i18n.rb.tt +2 -1
- data/lib/inertia_i18n/configuration.rb +6 -2
- data/lib/inertia_i18n/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: 233834d7267d92e29c7209378f7acfcec0eeb9e8caf0f5605e4940fff5206c58
|
|
4
|
+
data.tar.gz: 18e927a425cc0d03d050f06f9c1a9e9e26900026ae8b84a3338d30f81d8ce80b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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 =
|
|
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}"]
|
data/lib/inertia_i18n/version.rb
CHANGED
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.
|
|
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.
|
|
199
|
+
rubygems_version: 4.0.5
|
|
200
200
|
specification_version: 4
|
|
201
201
|
summary: Translation management for Inertia.js applications
|
|
202
202
|
test_files: []
|