Ticket #281 (new defect)
advanced-18n: improve error reporting in case of extraction errors
| Reported by: | cboos | Owned by: | palgarvio |
|---|---|---|---|
| Priority: | major | Milestone: | 0.7 |
| Component: | Internationalization | Version: | 0.5.1 |
| Keywords: | advanced-i18n | Cc: |
Description
While adding an i18n:msg attribute in Trac, I've not given enough "parameters" to this attribute when expressions were used in the corresponding element. This has lead to a traceback, which is not very nice, as I first thought I've hit a bug in Genshi.
After looking at the code, it appeared that it was simply an error report. This is not OK, extractors should be able to report errors more conveniently (well, I guess that's a Babel issue actually).
Nevertheless here a two suggested improvements:
- the error reporting could benefit from some code refactoring (attachment:refactor-error-reporting-for-extraction-errors-r967.diff)
- that error shouldn't actually be an error but only a warning, as one can easily produce automatic parameter names (attachment:warn-for-missing-parameters.patch). That patch applies on top of the former, and shouldn't be committed as such, as it should be better integrated with Babel. Currently the 'babel' logger is only present when Babel is used from the command line, not when called from the setup.py script.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.


