Patchwork [1,of,5] tests: add a i18n translation test for log output

login
register
mail settings
Submitter Sean Farley
Date Jan. 8, 2015, 12:15 a.m.
Message ID <cb77acb042a9b5fb26f7.1420676152@laptop.local>
Download mbox | patch
Permalink /patch/7368/
State Accepted
Headers show

Comments

Sean Farley - Jan. 8, 2015, 12:15 a.m.
# HG changeset patch
# User Sean Farley <sean.michael.farley@gmail.com>
# Date 1420066219 21600
#      Wed Dec 31 16:50:19 2014 -0600
# Node ID cb77acb042a9b5fb26f7e93f5d9b2939acbb67a7
# Parent  7ad155e13f0f51df8e986a0ec4e58ac9a0ccedbb
tests: add a i18n translation test for log output

Upcoming patches will change the way that log output is generated so we add a
test to ensure that the words 'branches', 'bookmarks', and 'tags' are still
translated.

Patch

diff --git a/tests/test-log.t b/tests/test-log.t
--- a/tests/test-log.t
+++ b/tests/test-log.t
@@ -1029,11 +1029,29 @@  log -b 2
   changeset:   0:24427303d56f
   user:        test
   date:        Thu Jan 01 00:00:00 1970 +0000
   summary:     commit on default
   
+#if gettext
 
+Test that all log names are translated (e.g. branches, bookmarks, tags):
+
+  $ hg bookmark babar -r tip
+
+  $ HGENCODING=UTF-8 LANGUAGE=de hg log -r tip
+  \xc3\x84nderung:        3:f5d8de11c2e2 (esc)
+  Zweig:           test
+  Lesezeichen:     babar
+  Marke:           tip
+  Vorg\xc3\xa4nger:       1:d32277701ccb (esc)
+  Nutzer:          test
+  Datum:           Thu Jan 01 00:00:00 1970 +0000
+  Zusammenfassung: commit on test
+  
+  $ hg bookmark -d babar
+
+#endif
 
 log -p --cwd dir (in subdir)
 
   $ mkdir dir
   $ hg log -p --cwd dir