wichert / lingua

Translation toolkit for Python
Other
46 stars 33 forks source link

Set 'i18n' attribute as default prefix where there was no prefix found. #6

Closed kiorky closed 12 years ago

kiorky commented 12 years ago

Because if it was not set, i have no msgid extracted from some templates i have found without i18n namespace declaration.

kiorky commented 12 years ago

Those templates are valid through because those are PT macros and so do not need to include themselves the namespace declaration.

wichert commented 12 years ago

Can you add tests demonstrating this change?

kiorky commented 12 years ago

EDIT

kiorky commented 12 years ago

Test added.

wichert commented 12 years ago

I suspect a simpler fix is initialise the prefix_stack to collections.deque(['i18n'])

kiorky commented 12 years ago

Something like that ?