mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 03:10:46 -06:00
DEV: add a way to skip locales with problems that break Discourse and need to be fixed in Transifex
This commit is contained in:
parent
3e436e2daf
commit
0ada6b81c2
@ -12,11 +12,17 @@ def expand_path(path)
|
|||||||
File.expand_path("../../#{path}", __FILE__)
|
File.expand_path("../../#{path}", __FILE__)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# List of locales that will break Discourse and need to be fixed
|
||||||
|
# by translators in Transifex.
|
||||||
|
def broken_locales
|
||||||
|
['ja']
|
||||||
|
end
|
||||||
|
|
||||||
def supported_locales
|
def supported_locales
|
||||||
Dir.glob(expand_path('config/locales/client.*.yml'))
|
Dir.glob(expand_path('config/locales/client.*.yml'))
|
||||||
.map { |x| x.split('.')[-2] }
|
.map { |x| x.split('.')[-2] }
|
||||||
.select { |x| x != 'en' }
|
.select { |x| x != 'en' }
|
||||||
.sort
|
.sort - broken_locales
|
||||||
end
|
end
|
||||||
|
|
||||||
YML_DIRS = ['config/locales',
|
YML_DIRS = ['config/locales',
|
||||||
|
Loading…
Reference in New Issue
Block a user