Compare Revisions
Last modification
- Rev 298 2014-12-03 05:42:40
- Author: PointedEars
- Log message:
eazytrans: Fixed support for alternation and optional parts (2)
| /trunk/tools/eazytrans/Dictionary.py |
| 185,7 → 185,7 |
| :type phrase: |
| """ |
| for expression, data in sorted(self._expressions.items(), key=lambda item:-len(item[1])): |
| expression_match = match(r'{0}$'.format(expression), phrase) |
| expression_match = match(expression, phrase) |
| if expression_match is not None: |
| data[self._language_key] = expression_match.group(0) |
| return data |