[RFC] I18N specification draft
Alexander Belchenko
bialix at ukr.net
Tue May 8 14:08:15 BST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Martin Pool пишет:
>> Please take a look on my draft:
>> http://bazaar-vcs.org/DraftSpecs/I18nSupport
>
> To me the largest code issue not addressed by this is what to do with
> the test suite. Some ui-oriented tests want to assert about the
> strings and need to be run in a known locale. On the other hand we
> probably want to test that the behaviour of most of the
> non-user-facing parts are consistent regardless of the locale, or to
> test them in any given locale. The best course may be to first run
> everything in a english utf-8 locale, then add some ui tests that
> specifically work in other languages, then switch some non-ui-based
> tests back to running in the environment's default locale.
OK. I'm not completely understand something.
I think we need to run almost all test suite in C locale.
And probably for limited set of string resources
we can do testing of non-english locales.
But it difficult (for me) to say how and what exactly need to be tested.
Some help from TDD guru needed.
I propose to force C locale for all [blackbox] tests now,
and later decide what cases require special testing in
non-english locale.
I add this to specification:
Force C locale for tests
- ------------------------
Actually python's gettext library looks at environment variables
LANGUAGE, LC_ALL, LC_MESSAGES, LANG
to determine user language.
To disable translations we should explicitly set LANGUAGE to 'C'
for all tests.
We should pay attention to 2 points:
1) run bzr as subprocess
2) run bzr in the same process
In first case method TestCase.run_bzr_subprocess() should always
set environment variable LANGUAGE to value 'C' for child process.
In second case method TestCase._cleanEnvironment() should add
to new_env dictionary key-value pair:
'LANGUAGE': 'C'
[µ]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGQHY/zYr338mxwCURAh21AJ9UjPLtV/M3Bwxf755CXu01TGSN2QCffu4N
1TkAyn7Rdc3zhOvSP3vGxb4=
=Dh0A
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list