mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 09:10:25 +08:00
Support for finding new locales in plugins
This commit is contained in:
parent
44081bdf73
commit
fc73de9578
3 changed files with 15 additions and 2 deletions
|
@ -14,7 +14,7 @@ describe LocaleSiteSetting do
|
|||
|
||||
describe 'values' do
|
||||
it 'returns all the locales that we have translations for' do
|
||||
expect(LocaleSiteSetting.values.map { |x| x[:value] }.sort).to eq(Dir.glob(File.join(Rails.root, 'config', 'locales', 'client.*.yml')).map { |x| x.split('.')[-2] }.sort)
|
||||
expect(LocaleSiteSetting.values.map { |x| x[:value] }).to include(*Dir.glob(File.join(Rails.root, 'config', 'locales', 'client.*.yml')).map { |x| x.split('.')[-2] })
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue