mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
FIX: Use fallback locales when searching for translations
This commit is contained in:
parent
cab5dd09d3
commit
2e875d3cca
2 changed files with 15 additions and 2 deletions
|
@ -40,6 +40,11 @@ describe I18n::Backend::DiscourseI18n do
|
|||
expect(results['items.other']).to eq('%{count} items')
|
||||
end
|
||||
|
||||
it 'uses fallback locales for searching' do
|
||||
expect(backend.search(:de, 'bar')).to eq({'bar' => 'Bar in :de'})
|
||||
expect(backend.search(:de, 'foo')).to eq({'foo' => 'Foo in :en'})
|
||||
end
|
||||
|
||||
describe '#exists?' do
|
||||
it 'returns true when a key is given that exists' do
|
||||
expect(backend.exists?(:de, :bar)).to eq(true)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue