From: Bruno Haible Date: Sun, 17 Jun 2007 23:36:48 +0000 (+0000) Subject: Improve plural form handling. X-Git-Tag: v0.17~327 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e2dc6d5483ba0466621404897b8781362b884686;p=thirdparty%2Fgettext.git Improve plural form handling. --- diff --git a/gettext-tools/misc/ChangeLog b/gettext-tools/misc/ChangeLog index 26d321135..72a46b213 100644 --- a/gettext-tools/misc/ChangeLog +++ b/gettext-tools/misc/ChangeLog @@ -1,3 +1,13 @@ +2007-06-17 Bruno Haible + + * po-mode.el (po-any-msgstr-regexp): Add support for plural forms. + The patch from 2001-03-10 did not work. + (po-untranslated-regexp): Recognize also empty msgstr[i] values. + +2007-06-17 Bruno Haible + + * po-mode.el (po-edit-out-full): Don't ask the user for confirmation. + 2007-06-17 Bruno Haible * po-mode.el: Untabify. diff --git a/gettext-tools/misc/po-mode.el b/gettext-tools/misc/po-mode.el index 4d3cd3c52..ca1732b1a 100644 --- a/gettext-tools/misc/po-mode.el +++ b/gettext-tools/misc/po-mode.el @@ -909,8 +909,7 @@ Initialize or replace current translation with the original message"))]) "Regexp matching a whole msgid field, whether obsolete or not.") (defvar po-any-msgstr-regexp - ;; "^\\(#~[ \t]*\\)?msgstr.*\n\\(\\(#~[ \t]*\\)?\".*\n\\)*" - "^\\(#~[ \t]*\\)?msgstr\\(\\[[0-9]\\]\\)?.*\n\\(\\(#~[ \t]*\\)?\".*\n\\)*" + "^\\(#~[ \t]*\\)?msgstr.*\n\\(\\(#~[ \t]*\\)?\".*\n\\)*\\(\\(#~[ \t]*\\)?msgstr\\[[0-9]\\].*\n\\(\\(#~[ \t]*\\)?\".*\n\\)*\\)*" "Regexp matching a whole msgstr or msgstr[] field, whether obsolete or not.") (defvar po-msgstr-idx-keyword-regexp @@ -1528,7 +1527,7 @@ If WRAP is not nil, the search may wrap around the buffer." "Regexp which should be true after a full msgstr string matched.") (defvar po-untranslated-regexp - (concat "^msgstr[ \t]*\"\"\n" po-after-entry-regexp) + (concat "^msgstr\\(\\[[0-9]\\]\\)?[ \t]*\"\"\n" po-after-entry-regexp) "Regexp matching a whole msgstr field, but only if active and empty.") (defun po-next-untranslated-entry ()