Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sketch an implementation of I18N. #144

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

domi41
Copy link

@domi41 domi41 commented Apr 30, 2020

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

Using `global`. (help!)
The locales files are in `src/hamcrest/core/locale.py` for now.
There's a wild print statement left, here for testing in the field.
More commits will follow.
@coveralls
Copy link

coveralls commented Apr 30, 2020

Coverage Status

Coverage remained the same at 0.0% when pulling c907ad7 on domi41:hack-i18n into 632840d on hamcrest:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 0.0% when pulling eb4d2bd on domi41:hack-i18n into 632840d on hamcrest:master.

@domi41
Copy link
Author

domi41 commented Apr 30, 2020

Should we use gettext ?

@domi41
Copy link
Author

domi41 commented Apr 30, 2020

Should we use python-i18n ?

@brunns
Copy link
Member

brunns commented Apr 30, 2020

python-i18n looks reasonable - but do wait for some input from @offbyone before putting too much time into this, I suggest.

@brunns
Copy link
Member

brunns commented Apr 30, 2020

OTOH, using gettext would avoid adding an additional runtime dependency. A complete guide to i18n in Python looks like a reasonable approach.

Base automatically changed from master to main March 6, 2021 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants