h1onE
2. August 2015 um 13:08
1
Jobs::HandledExceptionWrapper: Wrapped I18n::MissingInterpolationArgument: missing interpolation argument
gerhard
(Gerhard Schlager)
2. August 2015 um 19:14
2
I fixed the translation in Transifex. This should be fixed the next times translations get pulled into Discourse.
@techAPJ I feel like Discourse shouldn’t stop working when translations have missing interpolation arguments. Can we filter invalid translations during the pull from Transifex or somehow use the English locale when such an error occurs?
I thought the change to use English locale as fallback, which @riking worked on, was already in?
riking
(Kane York)
2. August 2015 um 21:52
4
It doesn’t cover the case of bad interpolations yet, just missing translations.
4 „Gefällt mir“
ndalliard
(Nate D.)
4. August 2015 um 07:35
5
Can someone just shortly explain me how that works? When will translation get pulled into discourse?
gerhard
(Gerhard Schlager)
4. August 2015 um 07:43
6
It’s a manual process and usually it’s done every Wednesday, but I guess it’s vacation time, so don’t count on it…
If you can’t wait, take a look at the locale-override plugin .
2 „Gefällt mir“
techAPJ
(Arpit Jalan)
4. August 2015 um 07:56
7
Translations are usually updated twice a week (Monday and Thursday). I just pushed the new translations:
committed 07:47AM - 04 Aug 15 UTC
5 „Gefällt mir“
gerhard
(Gerhard Schlager)
11. September 2015 um 18:44
8
@riking implemented a proper fix for this. This can be closed.
master ← riking:patch-6
merged 06:11PM - 11 Sep 15 UTC
This takes effect when an interpolation is removed from a translation in
a Disco… urse update.
How this works:
The I18n::Backend::Fallbacks loops with a catch(:exception), so calling throw(:exception) will cause it to use the next locale, until it reaches English which is assumed to be correct.
```
I18n.fallbacks[locale].each do |fallback|
begin
catch(:exception) do
result = super(fallback, key, options)
return result unless result.nil?
end
rescue I18n::InvalidLocale
# we do nothing when the locale is invalid, as this is a fallback anyways.
end
end
```
Also, enable fallbacks in everything except development (#3724 for more discussion) - we should be able to test the fallbacks.
3 „Gefällt mir“