mirror of
https://github.com/discourse/discourse.git
synced 2025-05-29 01:31:35 +08:00
FIX: translation precedence was different on client and server
As an example, the lookup order for German was: 1. override for de 2. override for en 3. value from de 4. value from en After this change the lookup order is the same as on the client: 1. override for de 2. value from de 3. override for en 4. value from en see /t/16381
This commit is contained in:

committed by
Gerhard Schlager

parent
8e9799da72
commit
e19a7a7c8d
@ -55,14 +55,8 @@ module I18n
|
||||
end
|
||||
|
||||
def search(locale, query)
|
||||
results = {}
|
||||
regexp = self.class.create_search_regexp(query)
|
||||
|
||||
I18n.fallbacks[locale].each do |fallback|
|
||||
find_results(regexp, results, translations[fallback])
|
||||
end
|
||||
|
||||
results
|
||||
find_results(regexp, {}, translations[locale])
|
||||
end
|
||||
|
||||
protected
|
||||
|
Reference in New Issue
Block a user