sabrams/cucumber-jvm — comment on commit da476b436566a4cf1e0a15381d3623fb0598c32f
File:  line 0
By sabrams:

That is correct. To support the annotation format we're given by the Jython interpreter for these unicode, non-ascii-able languages, there will at least need to be some pre-processing phase on the file. One possibility for a future update: we could use a character replacement mechanism on both the I18N file generator and this pre-processing phase, creating classes whose names were ascii-able. For example, if in English we suddenly started spelling Given with the Yen sign (Gi¥en), and someone wrote the step def:

@Gi¥en('I have (\d+) "(.+)" in my belly')
def something_in_the_belly(self, n, what):
self.n = int(n)
self.what = what

we could use a preprocess phase that parses this file, and feeds this to the Jython parser:

@GiU_00A5en('I have (\d+) "(.+)" in my belly')
def something_in_the_belly(self, n, what):
self.n = int(n)
self.what = what

This would run, grabbing the class name from the annotation, where the class def was already loaded in the EN.py I18N file:

And = But = GiU_00A5en = Then = When = I18NKeywordTemplate

(U_00A5 is Unicode char point for Yen sym)

Anyway, support for most of the languages is almost there - just need a way to load them and make them usable from any context (maven, cli, ide)