PyHamcrest
PyHamcrest copied to clipboard
Sketch an implementation of I18N.
Related: #143
- Using
global
. (help!) - The locales files are in
src/hamcrest/core/locale.py
for now. What to do with them?
More commits will follow.
Expected behavior:
If locale is set and translation exists, replace. Otherwise, do nothing.
This way we don't have to support all locales from the get-go, nor do we need to 100% support each locale.
DO NOT MERGE
Coverage remained the same at 0.0% when pulling c907ad7f30b9be42e07a4570004dea1ebbe6b962 on domi41:hack-i18n into 632840d9ffe7fd4e9ea9ad6ac1db9ff3871cb984 on hamcrest:master.
Coverage remained the same at 0.0% when pulling eb4d2bd987da12f81bb92ccde1fe74340794805e on domi41:hack-i18n into 632840d9ffe7fd4e9ea9ad6ac1db9ff3871cb984 on hamcrest:master.
Should we use gettext
?
Should we use python-i18n
?
python-i18n
looks reasonable - but do wait for some input from @offbyone before putting too much time into this, I suggest.
OTOH, using gettext
would avoid adding an additional runtime dependency. A complete guide to i18n in Python looks like a reasonable approach.