Feature #4050 » 0009-Use-pt_BR-instead-of-buggy-zh_TW-locale.patch
test/functional/welcome_controller_test.rb | ||
---|---|---|
49 | 49 |
|
50 | 50 |
def test_browser_language_alternate |
51 | 51 |
Setting.default_language = 'en' |
52 |
@request.env['HTTP_ACCEPT_LANGUAGE'] = 'zh-TW'
|
|
52 |
@request.env['HTTP_ACCEPT_LANGUAGE'] = 'pt-BR'
|
|
53 | 53 |
get :index |
54 |
assert_equal :"zh-TW", @controller.current_language
|
|
54 |
assert_equal :"pt-BR", @controller.current_language
|
|
55 | 55 |
end |
56 | 56 |
|
57 | 57 |
def test_browser_language_alternate_not_valid |
test/unit/lib/redmine/i18n_test.rb | ||
---|---|---|
92 | 92 |
def test_valid_language |
93 | 93 |
to_test = {'fr' => :fr, |
94 | 94 |
'Fr' => :fr, |
95 |
'zh' => :zh,
|
|
96 |
'zh-tw' => :"zh-TW",
|
|
97 |
'zh-TW' => :"zh-TW",
|
|
98 |
'zh-ZZ' => nil }
|
|
95 |
'pt' => :pt,
|
|
96 |
'pt-br' => :"pt-BR",
|
|
97 |
'pt-BR' => :"pt-BR",
|
|
98 |
'pt-ZZ' => nil }
|
|
99 | 99 |
|
100 | 100 |
to_test.each {|lang, expected| assert_equal expected, find_language(lang)} |
101 | 101 |
end |