Mercurial > hg > soundsoftware-site
comparison test/unit/lib/redmine/.svn/text-base/i18n_test.rb.svn-base @ 120:cd2282d2aa55 cannam
Merge from the default branch. Note that this is not a valid SVN repository any more (use default, redmine-1.1 etc for SVN updates).
author | Chris Cannam |
---|---|
date | Thu, 13 Jan 2011 14:33:08 +0000 |
parents | af80e5618e9b 8661b858af72 |
children | eeebe205a056 |
comparison
equal
deleted
inserted
replaced
118:b859cc0c4fa1 | 120:cd2282d2aa55 |
---|---|
107 'zh-TW' => :"zh-TW", | 107 'zh-TW' => :"zh-TW", |
108 'zh-ZZ' => nil } | 108 'zh-ZZ' => nil } |
109 | 109 |
110 to_test.each {|lang, expected| assert_equal expected, find_language(lang)} | 110 to_test.each {|lang, expected| assert_equal expected, find_language(lang)} |
111 end | 111 end |
112 | |
113 def test_fallback | |
114 ::I18n.backend.store_translations(:en, {:untranslated => "Untranslated string"}) | |
115 ::I18n.locale = 'en' | |
116 assert_equal "Untranslated string", l(:untranslated) | |
117 ::I18n.locale = 'fr' | |
118 assert_equal "Untranslated string", l(:untranslated) | |
119 | |
120 ::I18n.backend.store_translations(:fr, {:untranslated => "Pas de traduction"}) | |
121 ::I18n.locale = 'en' | |
122 assert_equal "Untranslated string", l(:untranslated) | |
123 ::I18n.locale = 'fr' | |
124 assert_equal "Pas de traduction", l(:untranslated) | |
125 end | |
112 end | 126 end |