]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Improve plural form handling.
authorBruno Haible <bruno@clisp.org>
Sun, 17 Jun 2007 23:36:48 +0000 (23:36 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:14:56 +0000 (12:14 +0200)
gettext-tools/misc/ChangeLog
gettext-tools/misc/po-mode.el

index 26d321135c4b3a267638cd947a144bbed89ba3be..72a46b213b2ab65e2db722cc2ea5c6fe57ab1e4b 100644 (file)
@@ -1,3 +1,13 @@
+2007-06-17  Bruno Haible  <bruno@clisp.org>
+
+       * 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  <bruno@clisp.org>
+
+       * po-mode.el (po-edit-out-full): Don't ask the user for confirmation.
+
 2007-06-17  Bruno Haible  <bruno@clisp.org>
 
        * po-mode.el: Untabify.
index 4d3cd3c5280a3fbef742d1cfe3d3677e90549807..ca1732b1a7890c047a1690705840732d9a4e8bec 100644 (file)
@@ -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 ()