bugGNU gettext - Bugs: bug #33552, po-mode.el: Highlight formatting...

 
 

bug #33552: po-mode.el: Highlight formatting strings with reordered arguments (e.g. %2$d)

Submitted by:  None
Submitted on:  Mon 13 Jun 2011 01:14:15 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 05 Mar 2013 07:06:45 AM UTC, comment #1:

It should be fixed with:
http://git.savannah.gnu.org/cgit/gettext.git/commit/?h=maint&id=34d5181d899e1b1691b046eb51f50ea213911fdb

Daiki Ueno <ueno>
Project Administrator
Mon 13 Jun 2011 01:14:15 PM UTC, original submission:

Currently po-mode.el highlights %s inside msgid/msgstr.

However if translation requires reordering of arguments as described in GNU gettext manual by using syntax such as "%2$d Zeichen lang ist die Zeichenkette `%1$s'", then po-mode.el no longer highlights %2$s equally as %s.

Following trivial change fixes highlighting:

--- /usr/share/emacs/site-lisp/gettext/po-mode.el~ 2010-09-19 18:14:43.000000000 +0300
+++ /usr/share/emacs/site-lisp/gettext/po-mode.el 2011-06-13 15:43:52.000000000 +0300
@@ -1057,7 +1057,7 @@
;; '("msgctxt " "msgid " "msgid_plural " "msgstr " "msgstr[0] " "msgstr[1] "))
("^\\(\\(msg\\(ctxt\\|id\\(_plural\\)?\\|str\\(\\[[0-9]\\]\\)?\\)\\) \\)?\"\\|\"$"
. font-lock-keyword-face)
- ("\\\\.\\|%\\?[-.0-9ul][a-zA-Z]" . font-lock-variable-name-face)
+ ("\\\\.\\|%\\([0-9]\\$\\)?\\?[-.0-9ul][a-zA-Z]" . font-lock-variable-name-face)
("^# .*\\|^#[:,]?" . font-lock-comment-face)
("^#:\\(.*\\)" 1 font-lock-reference-face)
;; The following line does not work, and I wonder why.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by ueno (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 05 Mar 2013 07:06:45 AM UTCuenoStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup