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

 
 

You are not allowed to post comments on this tracker with your current authentication level.

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:  PO mode Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  Daiki Ueno <ueno>
Open/Closed:  Closed

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 AdministratorIn charge of this item.
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

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by haible (Updated the item)
  • -email is unavailable- added by ueno (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can 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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-11-27 haible CategoryNone => PO mode
        Assigned toNone => ueno
    2013-03-05 ueno StatusNone => Fixed
        Open/ClosedOpen => Closed

    Back to the top


    Powered by Savane 3.3