Language code x_Y should fall back to x
(self)
| 121 | |
| 122 | @skipIfMissingPo |
| 123 | def test_get_text_fallback(self): |
| 124 | """Language code x_Y should fall back to x""" |
| 125 | for lang_id in ('es', 'es_XX', 'es_ES', 'es_ES.UTF-8', 'es_1235'): |
| 126 | options.set('forced_language', lang_id) |
| 127 | self.assertEqual(get_active_language_code(), lang_id) |
| 128 | setup_translation() |
| 129 | self.assertIn(get_text('Preview'), |
| 130 | ('Vista previa', 'Previsualizar')) |
| 131 | |
| 132 | def test_options_import_failure(self): |
| 133 | """Test handling of failed Options import in language detection""" |
nothing calls this directly
no test coverage detected