Lines Matching defs:msgstr
129 msgstr \"\"
595 ;; start of keyword lines are START-OF-MSGID and START-OF-MSGSTR.
599 (defvar po-start-of-msgstr)
614 ;; To allow simultaneous edition of the comment and the msgstr of an entry,
616 ;; the msgstr line if the msgstr is being edited. EDIT-BUFFER is the
676 Msgstr Comments M Mail officially
764 "Msgstr"
765 ["Edit msgstr" po-edit-msgstr
768 ["Ediff and merge msgstr" po-edit-msgstr-and-ediff
771 ["Cut msgstr" po-kill-msgstr
774 ["Copy msgstr" po-kill-ring-save-msgstr
777 ["Paste msgstr" po-yank-msgstr
804 ["Init with msgid" po-msgid-to-msgstr
916 (defvar po-any-msgstr-regexp
917 ;; "^\\(#~[ \t]*\\)?msgstr.*\n\\(\\(#~[ \t]*\\)?\".*\n\\)*"
918 "^\\(#~[ \t]*\\)?msgstr\\(\\[[0-9]\\]\\)?.*\n\\(\\(#~[ \t]*\\)?\".*\n\\)*"
919 "Regexp matching a whole msgstr or msgstr[] field, whether obsolete or not.")
921 (defvar po-msgstr-idx-keyword-regexp
922 "^\\(#~[ \t]*\\)?msgstr\\[[0-9]\\]"
923 "Regexp matching an indexed msgstr keyword, whether obsolete or not.")
931 ;; ("^\\(msgid \\|msgstr \\)?\"\\|\"$" . font-lock-keyword-face)
933 ;; '("msgid " "msgid_plural " "msgstr " "msgstr[0] " "msgstr[1] "))
956 ;; ("^\\(msgid\\|msgstr\\) *\"" nil keyword)
976 (define-key po-mode-map "\C-j" 'po-msgid-to-msgstr)
977 (define-key po-mode-map "\C-m" 'po-edit-msgstr)
990 (define-key po-mode-map "k" 'po-kill-msgstr)
1002 (define-key po-mode-map "w" 'po-kill-ring-save-msgstr)
1004 (define-key po-mode-map "y" 'po-yank-msgstr)
1023 (define-key po-mode-map "\C-c\C-e" 'po-edit-msgstr-and-ediff)
1061 (make-local-variable 'po-start-of-msgstr)
1171 (setq current po-start-of-msgstr)
1180 (while (re-search-forward po-any-msgstr-regexp nil t)
1240 (if (re-search-forward po-any-msgstr-regexp nil t)
1300 Set variables PO-START-OF-ENTRY, PO-START-OF-MSGID, PO-START-OF-MSGSTR,
1304 (if (re-search-backward po-any-msgstr-regexp nil t)
1310 (re-search-forward po-any-msgstr-regexp)
1313 ;; We most probably found the msgstr of the previous
1320 (setq po-start-of-msgstr (match-beginning 0)
1322 (if (re-search-forward po-any-msgstr-regexp nil t)
1325 (setq po-start-of-msgstr (match-beginning 0)
1328 ;; file entry is the end of the previous msgstr if
1330 (goto-char po-start-of-msgstr)
1332 (if (re-search-backward po-any-msgstr-regexp nil t)
1335 ;; The cursor was inside msgstr of the current entry.
1336 (setq po-start-of-msgstr (match-beginning 0)
1339 ;; msgstr if any, or else, the beginning of the file.
1340 (goto-char po-start-of-msgstr)
1342 (if (re-search-backward po-any-msgstr-regexp nil t)
1345 ;; The cursor was before msgstr in the first entry in the file.
1349 (re-search-forward po-any-msgstr-regexp)
1350 (setq po-start-of-msgstr (match-beginning 0)
1363 (goto-char po-start-of-msgstr)
1453 "Display the first entry in the file which msgstr matches REGEXP."
1464 "Display the last entry in the file which msgstr matches REGEXP."
1473 "Display the entry following the current entry which msgstr matches REGEXP.
1494 "Redisplay the entry preceding the current entry which msgstr matches REGEXP.
1516 (po-first-entry-with-regexp po-any-msgstr-regexp))
1521 (po-last-entry-with-regexp po-any-msgstr-regexp))
1526 (po-next-entry-with-regexp po-any-msgstr-regexp nil))
1531 (po-previous-entry-with-regexp po-any-msgstr-regexp nil))
1537 "Regexp which should be true after a full msgstr string matched.")
1540 (concat "^msgstr[ \t]*\"\"\n" po-after-entry-regexp)
1541 "Regexp matching a whole msgstr field, but only if active and empty.")
1553 (defun po-msgid-to-msgstr ()
1554 "Use another window to edit msgstr reinitialized with msgid."
1560 (po-set-msgstr (po-get-msgid nil)))
1565 (defvar po-obsolete-msgstr-regexp
1566 "^#~[ \t]*msgstr.*\n\\(#~[ \t]*\".*\n\\)*"
1567 "Regexp matching a whole msgstr field of an obsolete entry.")
1572 (po-next-entry-with-regexp po-obsolete-msgstr-regexp t))
1577 (po-previous-entry-with-regexp po-obsolete-msgstr-regexp t))
1615 (po-next-entry-with-regexp po-any-msgstr-regexp t)
1618 (po-next-entry-with-regexp po-any-msgstr-regexp t)
1626 (po-previous-entry-with-regexp po-any-msgstr-regexp t)
1648 (if (re-search-forward po-any-msgstr-regexp nil t)
1678 (re-search-forward po-obsolete-msgstr-regexp nil t))
1778 po-start-of-msgid po-start-of-msgstr)))
1782 (defun po-get-msgstr (kill)
1783 "Extract and return the unquoted msgstr string.
1786 po-start-of-msgstr po-end-of-entry)))
1801 (re-search-forward po-any-msgid-regexp po-start-of-msgstr)
1809 (defun po-set-msgstr (form)
1810 "Replace the current msgstr or msgstr[], using FORM to get a string.
1815 Returns 'nil' if the buffer has not been modified, for if the new msgstr
1816 described by FORM is merely identical to the msgstr already in place."
1817 (let ((string (po-eval-requoted form "msgstr" (eq po-entry-type 'obsolete)))
1818 (msgstr-idx nil))
1821 (save-excursion ; check for an indexed msgstr
1822 (if (re-search-forward po-msgstr-idx-keyword-regexp
1824 (setq msgstr-idx (buffer-substring-no-properties
1826 (re-search-forward po-any-msgstr-regexp po-end-of-entry)
1832 (if (eq msgstr-idx nil) ; hack: replace msgstr with msgstr[d]
1834 (insert msgstr-idx)
1835 (looking-at "\\(#~[ \t]*\\)?msgstr")
1842 (defun po-kill-ring-save-msgstr ()
1843 "Push the msgstr string from current entry on the kill ring."
1846 (po-get-msgstr t))
1848 (defun po-kill-msgstr ()
1849 "Empty the msgstr string from current entry, pushing it on the kill ring."
1851 (po-kill-ring-save-msgstr)
1852 (po-set-msgstr ""))
1854 (defun po-yank-msgstr ()
1855 "Replace the current msgstr string by the top of the kill ring."
1858 (po-set-msgstr (if (eq last-command 'yank) '(yank-pop 1) '(yank)))
1863 or completely delete an obsolete entry, saving its msgstr on the kill ring."
1893 (po-check-for-pending-edit po-start-of-msgstr))
1896 (po-get-msgstr t)
1900 (if (re-search-forward po-any-msgstr-regexp nil t)
1902 (re-search-backward po-any-msgstr-regexp nil t))
1972 "Push the msgstr string from current entry on the kill ring."
1978 "Empty the msgstr string from current entry, pushing it on the kill ring."
2092 (buf1 " *po-msgstr-1") ; default if first marker is missing
2103 (error "Only 1 msgstr found")
2165 ((= (point) po-start-of-msgstr)
2166 (let ((replaced (po-set-msgstr string)))
2179 TYPE may be 'comment or 'msgstr. If EXPAND-TABS, expand tabs to spaces.
2183 ((eq type 'msgstr) po-start-of-msgstr)))
2190 (if (and (eq type 'msgstr) po-highlighting)
2192 ;; (goto-char (1- po-start-of-msgstr))
2232 This function calls `po-edit-msgstr' and `po-subedit-ediff'; for more info
2238 (defun po-edit-msgstr ()
2239 "Use another window to edit the current msgstr."
2245 (po-get-msgstr nil))
2246 'msgstr
2249 (defun po-edit-msgstr-and-ediff ()
2250 "Use `ediff' to edit the current msgstr.
2251 This function calls `po-edit-msgstr' and `po-subedit-ediff'; for more info
2254 (po-edit-msgstr)
2279 "Normalize FIELD of all entries. FIELD is either the symbol msgid or msgstr.
2284 (while (re-search-forward po-any-msgstr-regexp nil t)
2290 ((eq field 'msgstr) (po-set-msgstr (po-get-msgstr nil))))
2350 "Search a PO file NAME for a 'msgid' STRING having a non-empty 'msgstr'.
2352 found, display the file over the current window, with the 'msgstr' field
2363 (if (looking-at "^msgstr ")
2368 (buffer-substring po-start-of-msgstr po-end-of-entry)
2369 "msgstr \"\"\n")
2378 (re-search-forward po-any-msgstr-regexp nil t)
2381 (re-search-forward "msgstr +" nil t)
2395 (let ((string (buffer-substring po-start-of-msgid po-start-of-msgstr))
2433 (let ((string (buffer-substring po-start-of-msgid po-start-of-msgstr))
2676 (insert (po-eval-requoted contents "msgid" nil) "msgstr \"\"\n"))
3196 (re-search-forward po-any-msgstr-regexp)
3245 (re-search-forward po-any-msgstr-regexp)