New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wmlxgettext does not recognize plural strings in some contexts #3469
Comments
It was intentional that wmlxgettext requires a space before the underscore (_), but I never figured this particular usage case. The explaination why wmlxgettext can't recognize it without space: since wmlxgettext uses regular expressions in order to parse lua/wml code it is necessary to define some clear rules in order to avoid possible unwanted behaviors. So... what should I consider a valid translatable, other than |
You could just say _ at the beginning of a line or preceded by |
I think you want to exclude not |
boundaries seems a very good suggestion. It would make the current regex also simplier, I will follow your suggestion (testing if regex will create or not new bugs... since the regex chain is complex a test is always mandatory before committing any change) |
By the way, while I have your attention @AncientLich - is it correct that all the wmlxgettext code (apart from the main file) is gathered into that single pywmlx directory? |
Exactly. pywmlx directory contains all the code of wmlxgettext (imported in main file with 'import pywmlx'). Note: |
…ome context (wesnoth#3481) * bugfix: wesnoth#3469 * wmlxgettext: removed a debug comment forgotten on the previous bugfix
…ome context (wesnoth#3481) * bugfix: wesnoth#3469 * wmlxgettext: removed a debug comment forgotten on the previous bugfix (cherry-picked from commit 4b79c26)
I had a line similar to the following:
When I ran wmlxgettext, the string was not gathered. Adding a space before the underscore allowed wmlxgettext to recognize it.
The text was updated successfully, but these errors were encountered: