GNOME Bugzilla – Bug 548552
Improving gettext highlighting
Last modified: 2018-05-26 10:09:04 UTC
Hi, I would like some improvements for gettext highlighting : → Adding the new keyword "msgctx" for the new type comment (http://live.gnome.org/GnomeGoals/MsgctxtMigration). → Highlighting the "fuzzy" keyword and untranslated string like TODO and FIXME
Created attachment 117013 [details] [review] Add msgctx keyword
Created attachment 117014 [details] [review] Adds fuzzy highlighting
Created attachment 117017 [details] [review] Trying to add untranslated highlighting (not working) I didn't manage to get it working. I think there is a conflict with the msgstr keyword, but I don't know how to solve that. Could someone help me with this one? Thanks a lot.
Put the "empty" context before "keyword" (no idea if it all will start working nicely, but keyword context won't steal the "msgstr" string).
Thanks Yevgen. It almost works but it seems that regex can't recognize a newline : <match>msgstr(\[\d+\])?\ ""\ *\n</match> I've looked in other .lang files, and sql.lang contains this comment <!-- FIXME no \n in patterns! -->. Is there a workaround to detect a newline ? Thanks.
Detect end of line instead: msgstr(\[\d+\])?\ ""\ *$ But it is broken, isn't it? Can't you have stuff like msgstr "" "actual stuff here because it's a long string or something"
Yes I must detect a newline or the EOF because of the example you've mentioned. (And I don't even try to detect some strange syntax like : msgstr "" "" ) Thanks.
the keyword is msgctxt, not msgctx
Thanks Claude, I will edit it ASAP. BTW, do you have any other suggestions about thoses patches ? Regards,
I started adding the highlighting of msgctxt and fuzzy to svn so that they'll surely make into the next version.
*** Bug 333795 has been marked as a duplicate of this bug. ***
Some patches were merged, and some patches were work-in-progress (probably with lots of conflicts now). So it's not very useful to keep this bug open.