themosis / documentation

Official documentation of the Themosis framework.
http://framework.themosis.com/
52 stars 37 forks source link

Update gettext instructions for Poedit 2 #52

Closed vslavik closed 7 years ago

vslavik commented 7 years ago

This PR updates documentation on extracting __ etc. strings to warn about the inability to extract from quoted strings when relying on the workaround hack with pretending that the template is a PHP or Python source file.

Also adds an explanation that the workaround to make Poedit extract strings by pretending that Twig files are Python ones has some limitations: in particular, pretty much any use of quotes prevents extraction from within them. Plenty of people are understandably surprised by this behavior (exhibit A, B, C to show a few public ones on SO), so being upfront about it hopefully prevents a few nasty surprises.

(I'm basing this off 1.3, but am not sure if it's correct. If you'd like me to rebase against master, or submit PRs for both, just tell me.)