First time here? Check out the FAQ!

Revision history  [back]

LANGUAGE_CODE = 'ja' causes many test failures and errors

Changing LANGUAGE_CODE = 'en' to LANGUAGE_CODE = 'ja' in settings.py caused many failures and errors (I included failures at the end of this post) when I ran test askbot command.

I am thinking about a workaround to keep LANGUAGE_CODE = 'en' as is and translate the user interface directly inside html files in templates folder. Do you think this workaround works? What else do you suggest?

I guess using .po file together with LANGUAGE_CODE = 'ja' may be the best practice. However, because of those errors, I am hesitant to go this route and possibly end up tweaking the code to pass all the tests.

Any thoughts would be appreciated. Thank you.

====================================================================== FAIL: test_load_object_description_fails (askbot.tests.page_load_tests.CommandViewTests) ---------------------------------------------------------------------- Traceback (most recent call last):
File "/media/sf_Ubuntu/shihoushiken/askbot/askbot/tests/page_load_tests.py", line 736, in test_load_object_description_fails self.assertEqual(title, 'Page not found') AssertionError: u'\u30da\u30fc\u30b8\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093' != 'Page not found'

====================================================================== FAIL: test_privatize_public_question (askbot.tests.question_views_tests.PrivateQuestionViewsTests) ---------------------------------------------------------------------- Traceback (most recent call last):
File "/media/sf_Ubuntu/shihoushiken/askbot/askbot/tests/question_views_tests.py", line 90, in test_privatize_public_question self.assertFalse(models.Group.objects.get_global_group() in set(question.groups.all())) AssertionError: True is not false

====================================================================== FAIL: test_publish_private_question (askbot.tests.question_views_tests.PrivateQuestionViewsTests) ---------------------------------------------------------------------- Traceback (most recent call last):
File "/media/sf_Ubuntu/shihoushiken/askbot/askbot/tests/question_views_tests.py", line 69, in test_publish_private_question self.assertTrue(models.Group.objects.get_global_group() in set(question.groups.all())) AssertionError: False is not true

====================================================================== FAIL: test_answer_question (askbot.tests.post_model_tests.ThreadRenderCacheUpdateTests) ---------------------------------------------------------------------- Traceback (most recent call last):
File "/media/sf_Ubuntu/shihoushiken/askbot/askbot/tests/post_model_tests.py", line 547, in test_answer_question self.assertEqual(2, Post.objects.count()) AssertionError: 2 != 1

====================================================================== FAIL: test_edit_question (askbot.tests.post_model_tests.ThreadRenderCacheUpdateTests) ---------------------------------------------------------------------- Traceback (most recent call last):
File "/media/sf_Ubuntu/shihoushiken/askbot/askbot/tests/post_model_tests.py", line 504, in test_edit_question self.assertTrue(thread.last_activity_at

question.added_at) AssertionError: False is not true

====================================================================== FAIL: test_retag_question (askbot.tests.post_model_tests.ThreadRenderCacheUpdateTests) ---------------------------------------------------------------------- Traceback (most recent call last):
File "/media/sf_Ubuntu/shihoushiken/askbot/askbot/tests/post_model_tests.py", line 522, in test_retag_question self.assertItemsEqual(['tag1', 'tag2'], list(question.thread.tags.values_list('name', flat=True))) AssertionError: Element counts were not equal: First has 1, Second has 0: u'test' First has 0, Second has 1: 'tag1' First has 0, Second has 1: 'tag2'

====================================================================== FAIL: test_thread_summary_locmem_cache (askbot.tests.post_model_tests.ThreadRenderLowLevelCachingTests) ---------------------------------------------------------------------- Traceback (most recent call last):
File "/media/sf_Ubuntu/shihoushiken/askbot/askbot/tests/post_model_tests.py", line 370, in test_thread_summary_locmem_cache self.assertTrue(thread.summary_html_cached()) AssertionError: False is not true