PyHamcrest
PyHamcrest copied to clipboard
Internationalization (I18N)
Hello !
Any plans for I18N of hamcrest ?
Assertion Failed:
Expected: <32>
but: was <2>
I see that some of the tests rely on parsing the error message in english.
Are there any pitfalls or caveats I should be aware of? Suggestions of L10N implementation? (like the format of the language files)
Rationale for I18N
Behavior-Driven with Gherkin feature
files, using hamcrest for assertions in steps.
The output of the runner will be read by everyone, including the informatically illiterate and monoglot.
Interesting idea - but I'm not sure we would have the community support to provide and maintain the translations. If anyone has any ideas, I'm all ears.
The Assertion Failed
message comes from the AssertionError
itself, right?
I can't find useful information on how to I18N python's built-in exceptions.
Should we use our own, extended AssertionError
? Is there another way ?