traco 5.3.1 → 5.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +109 -0
- data/lib/traco/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8578dcbe5ffad338b2a486d18610d2c018d2a7f1cbf1e051037a0780eee98f30
|
4
|
+
data.tar.gz: c8df336aeedb3649d5629a88076bb11f89ff4e19d465bc8471110df24ea49098
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b2a96991498a6ca004cc5e804a489c856e8e769e3b12d7a1c9194134ca261beed7dd9de383fa46b48a2dfdabdac20bffa4d00667e33c2d7ddc14502c94fcdac
|
7
|
+
data.tar.gz: b0b95f3fc8904fb754554a7af9f468ca26089ae241cc140829c37c3c233fc7982a2d525f473adb8b604901e2467b729717ec17fc8382d473143b2bfedd0396c6
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,109 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
## 5.3.2
|
4
|
+
|
5
|
+
* This version is only to actually include this CHANGELOG in the gem, so you can see the below if you compare gem diffs 😅
|
6
|
+
|
7
|
+
## 5.3.1
|
8
|
+
|
9
|
+
* This version is only to clarify a backwards incompatibility if relying on undocumented behaviour:
|
10
|
+
|
11
|
+
Readers like `post.title` no longer accept (and ignore) arbitrary keyword arguments.
|
12
|
+
|
13
|
+
So if you would e.g. override a reader like this before:
|
14
|
+
|
15
|
+
def my_title(my_arg:)
|
16
|
+
super || "my fallback #{my_arg}"
|
17
|
+
end
|
18
|
+
|
19
|
+
You will instead need to do:
|
20
|
+
|
21
|
+
def my_title(my_arg:)
|
22
|
+
super() || "my fallback #{my_arg}"
|
23
|
+
end
|
24
|
+
|
25
|
+
## 5.3.0
|
26
|
+
|
27
|
+
* Feature: You can pass a desired locale to readers and query methods, e.g. `post.title(locale: :de)` to get the German-locale title, and `post.title?(locale: :de)` to check if one exists. This ignores fallback settings – use `I18n.with_locale(:de) { post.title }` if you want fallbacks.
|
28
|
+
|
29
|
+
## 5.2.0
|
30
|
+
|
31
|
+
* Feature: `locale_columns` without a passed column name returns all locale columns. Thanks to [manuelmeurer](https://github.com/manuelmeurer)!
|
32
|
+
|
33
|
+
## 5.1.0
|
34
|
+
|
35
|
+
* Feature: Add `fallback: :i18n` to use the fallbacks from `I18n.fallbacks`. Thanks to [sunny](https://github.com/sunny)!
|
36
|
+
|
37
|
+
## 5.0.0
|
38
|
+
|
39
|
+
* Change `locale_columns` and `locales_for_attribute` to sort current locale first, then default locale (previously, it was default locale first). This makes more sense for our own apps, and hopefully other apps as well.
|
40
|
+
|
41
|
+
## 4.0.0
|
42
|
+
|
43
|
+
* Drop support for end-of-lifed Ruby 2.1 and 2.2.
|
44
|
+
|
45
|
+
## 3.3.0
|
46
|
+
|
47
|
+
* Traco now automatically adds query methods, e.g. `Item#title?` when `title` is translated.
|
48
|
+
|
49
|
+
## 3.2.2
|
50
|
+
|
51
|
+
* Internal cleanup.
|
52
|
+
|
53
|
+
## 3.2.1
|
54
|
+
|
55
|
+
* Bugfix: with `fallback: [:sv]`, always look at current locale before any fallbacks.
|
56
|
+
|
57
|
+
## 3.2.0
|
58
|
+
|
59
|
+
* Introduce e.g. `fallback: [:sv]` to explicitly specify fallbacks.
|
60
|
+
|
61
|
+
## 3.1.6
|
62
|
+
|
63
|
+
Make [license (MIT)](LICENSE.txt) easier to autodetect.
|
64
|
+
|
65
|
+
## 3.1.5
|
66
|
+
|
67
|
+
* Bugfix: don't raise error loading models before the DB is created. Thanks to PikachuEXE and Andrii Malyshko.
|
68
|
+
|
69
|
+
## 3.1.4
|
70
|
+
|
71
|
+
* Bugfix: restore sorting of `locale_columns` and `locales_for_attribute` to put default locale first, not current locale. Thanks to PikachuEXE.
|
72
|
+
|
73
|
+
## 3.1.3
|
74
|
+
|
75
|
+
* ~20 time speedup thanks to optimizations by Andrii Malyshko.
|
76
|
+
|
77
|
+
Reading a Traco translated attribute used to be ~250x slower than an untranslated attribute; now it's down to ~10x slower.
|
78
|
+
|
79
|
+
## 3.1.2
|
80
|
+
|
81
|
+
* Bugfix: `.current_locale_column` handles dashed locales like "pt-BR" correctly. Thanks to PikachuEXE.
|
82
|
+
|
83
|
+
## 3.1.1
|
84
|
+
|
85
|
+
* Bugfix around fallbacks and memoization. Thanks to PikachuEXE.
|
86
|
+
|
87
|
+
## 3.1.0
|
88
|
+
|
89
|
+
* Introduce `.current_locale_column`, e.g. `Post.current_locale_column(:title) # => :title_sv`.
|
90
|
+
|
91
|
+
## 3.0.0
|
92
|
+
|
93
|
+
* Backwards incompatible: `fallback: true` is now `fallback: :default`. Since this was the implicit default value, you shouldn't have a problem unless you explicitly declared this value.
|
94
|
+
|
95
|
+
## 2.2.0
|
96
|
+
|
97
|
+
* `fallback: :any` to fall back to any other locale if the text is blank in the current and default locales.
|
98
|
+
|
99
|
+
## 2.1.0
|
100
|
+
|
101
|
+
* Attribute readers can override the attribute's `fallback` setting, e.g. `item.title(fallback: false)`.
|
102
|
+
|
103
|
+
## 2.0.0
|
104
|
+
|
105
|
+
* Backwards incompatible: for dashed locales like "pt-BR", the column names are now expected to end in e.g. `_pt_br`, not `_pt-BR`.
|
106
|
+
|
107
|
+
## 1.3.0
|
108
|
+
|
109
|
+
Whatever we had before introducing this changelog.
|
data/lib/traco/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: traco
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.3.
|
4
|
+
version: 5.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henrik Nyh
|
@@ -87,6 +87,7 @@ executables: []
|
|
87
87
|
extensions: []
|
88
88
|
extra_rdoc_files: []
|
89
89
|
files:
|
90
|
+
- CHANGELOG.md
|
90
91
|
- LICENSE.txt
|
91
92
|
- lib/traco.rb
|
92
93
|
- lib/traco/attributes.rb
|