• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/timemachine/gettext-0.17/gettext-tools/misc/

Lines Matching +defs:code +defs:string

54 ;;    it should also highlight the msgid_plural string, I would say, since
68 (defconst po-mode-version-string "2.1" "\
80 (cond ((string-match "XEmacs\\|Lucid" emacs-version)
82 ((and (string-lessp "19" emacs-version) (featurep 'faces))
89 (defsubst set-translation-domain (string) nil))
90 (or (fboundp 'translate-string)
91 (defsubst translate-string (string) string)))
92 (defsubst _ (string) (translate-string string))
93 (defsubst N_ (string) string)
153 :type 'string
161 :type 'string
166 :type 'string
186 (defcustom po-team-name-to-code
464 If a string instead of an alist, it is a team code to use unconditionnally."
472 :type 'string
485 ;; Protect string comparisons from text properties if possible.
492 (if (fboundp 'match-string-no-properties)
493 (fset 'po-match-string (symbol-function 'match-string-no-properties))
494 (defun po-match-string (number)
495 "Return string of text matched by last search."
523 (defun po-kill-new (string)
526 (insert string)
569 "Use OVERLAY to highlight the string from START to END.
579 "Display normally the last string which OVERLAY highlighted.
595 "Use EXTENT to highlight the string from START to END.
605 "Display normally the last string which EXTENT highlighted."
615 "Use OVERLAY to highlight the string from START to END.
648 "Display normally the last string which OVERLAY highlighted."
707 (defvar po-mode-line-string)
716 ;; temporary Emacs buffer used to edit the string. OVERLAY-INFO, when not
718 ;; markers) for this msgid string which became highlighted for the edit.
733 ;; be used for completing read, FILE is a string and LINE is a number.
742 ;; STRING-CONTENTS holds the value of the most recent string found in sources,
745 ;; which highlight the last found string; for older Emacses, it holds the cons
748 (defvar po-string-contents)
749 (defvar po-string-buffer)
750 (defvar po-string-start)
751 (defvar po-string-end)
764 (message (_"Emacs PO mode, version %s") po-mode-version-string))
766 (defconst po-help-display-string
782 , Find next string Compendiums m Mark and push current
935 ["Find first string" (po-tags-search '(nil)) t]
937 ["Find next string" po-tags-search t]
1034 ;; Font lock based highlighting code.
1054 ;; 'hilit19' based highlighting code has been disabled, as most probably
1177 (make-local-variable 'po-mode-line-string)
1194 (set (make-local-variable 'po-string-contents) nil)
1195 (set (make-local-variable 'po-string-buffer) nil)
1196 (set (make-local-variable 'po-string-start) nil)
1197 (set (make-local-variable 'po-string-end) nil)
1220 (defvar po-mode-line-entry '(po-mode-flag (" " po-mode-line-string))
1225 ;; mode-line-format usually contains global-mode-string, but some
1227 (let ((prev-entry (or (member 'global-mode-string mode-line-format)
1232 (defun po-update-mode-line-string ()
1233 "Compute a new statistics string to display in mode line."
1234 (setq po-mode-line-string
1262 (po-update-mode-line-string))
1283 (if (string-equal (po-get-msgid) "")
1320 (po-update-mode-line-string))
1382 (if (fboundp 'format-time-string)
1399 (format-time-string "%Y-%m-%d %H:%M" time)
1661 "Regexp which should be true after a full msgstr string matched.")
1706 "Regexp matching the string inserted by msgmerge for translations
1730 (po-update-mode-line-string))
1815 "Extract and return the unquoted string in BUFFER going from START to END.
1816 Crumb preceding or following the quoted string is ignored."
1827 "Extract and return the unquoted string in BUFFER going from START to END.
1855 (buffer-string)))
1858 "Eval FORM, which inserts a string, and return the string fully requoted.
1860 generated lines in the returned string. Evaluating FORM should insert the
1861 wanted string in the buffer which is current at the time of evaluation.
1862 If FORM is itself a string, then this string is used for insertion."
1896 (buffer-string))))
1899 "Extract and return the unquoted msgid string."
1900 (let ((string (po-extract-unquoted (current-buffer)
1903 string))
1909 (match-string 2))
1912 "Extract and return the unquoted msgstr string."
1914 (string (po-extract-unquoted (current-buffer)
1918 string))
1921 "Replace the current msgid, using FORM to get a string.
1922 Evaluating FORM should insert the wanted string in the current buffer. If
1923 FORM is itself a string, then this string is used for insertion. The string
1928 (let ((string (po-eval-requoted form "msgid" (eq po-entry-type 'obsolete))))
1932 (and (not (string-equal (po-match-string 0) string))
1934 (replace-match string t t)
1940 "Replace the current msgstr or msgstr[], using FORM to get a string.
1941 Evaluating FORM should insert the wanted string in the current buffer. If
1942 FORM is itself a string, then this string is used for insertion. The string
1947 (let ((string (po-eval-requoted form
1953 (and (not (string-equal (po-match-string 0) string))
1956 (replace-match string t t)
1963 "Push the msgstr string from current entry on the kill ring."
1966 (let ((string (po-get-msgstr-form)))
1967 (po-kill-new string)
1968 string))
1971 "Empty the msgstr string from current entry, pushing it on the kill ring."
1977 "Replace the current msgstr string by the top of the kill ring."
2017 (po-update-mode-line-string)
2037 "Extract and return the editable comment string, uncommented.
2052 (buffer-string))
2056 "Using FORM to get a string, replace the current editable comment.
2057 Evaluating FORM should insert the wanted string in the current buffer.
2058 If FORM is itself a string, then this string is used for insertion.
2059 The string is properly recommented before the replacement occurs."
2061 string)
2073 (setq string (buffer-string)))
2076 (if (not (string-equal (po-match-string 0) string))
2078 (replace-match string t t)))
2081 (insert string))))
2085 "Push the msgstr string from current entry on the kill ring."
2091 "Empty the msgstr string from current entry, pushing it on the kill ring."
2098 "Replace the current comment string by the top of the kill ring."
2108 ;; In a string edit buffer, BACK-POINTER points to one of the slots of the
2213 (and (setq buf1 (match-string-no-properties 1))
2218 (setq buf2 (match-string-no-properties 1)
2241 (if (not (string-equal (buffer-substring-no-properties start-1 end-1)
2266 "Exit the subedit buffer, replacing the string in the PO buffer."
2273 (let ((string (buffer-string)))
2277 (po-set-comment string)
2280 (let ((replaced (po-set-msgstr-form string)))
2291 (defun po-edit-string (string type expand-tabs)
2325 (insert string "<")
2342 (po-edit-string (po-get-comment nil) 'comment nil))
2356 (po-edit-string (if (and po-auto-edit-with-msgid
2375 "Normalize old gettext style fields using K&R C multiline string syntax.
2376 To minibuffer messages sent while normalizing, add the EXPLAIN string."
2394 To minibuffer messages sent while normalizing, add the EXPLAIN string."
2435 string)
2437 (setq string (concat string (if string " ") (car (car cursor)))
2441 (setq string (concat string (if string " ") (car (car cursor)))
2443 (message string))
2464 (defun po-seek-equivalent-translation (name string)
2476 (while (and (not found) (search-forward string nil t))
2482 (or (string-equal
2510 (let ((string (buffer-substring po-start-of-msgid
2516 (if (and (not (string-equal buffer-file-name name))
2517 (po-seek-equivalent-translation name string))
2524 (if (and (not (string-equal buffer-file-name name))
2525 (po-seek-equivalent-translation name string))
2549 (let ((string
2555 (or (po-seek-equivalent-translation name string)
2565 string)
2567 (setq string (concat string (if string " ") (car (car cursor)))
2569 (message string))
2575 (setq po-search-path (cons (list (if (string-match "/$" directory)
2604 (setq name (po-match-string 2)
2605 line (po-match-string 3)
2607 (if (string-equal name "")
2618 (string-to-number line))
2673 (defvar po-find-string-function)
2674 (defvar po-mark-string-function)
2681 "Find an unmarked translatable string through all files in tags table.
2689 (setq po-string-contents nil)
2690 ;; Search for a string which might later be marked for translation.
2693 (pop-to-buffer po-string-buffer)
2703 (if po-string-contents
2705 (buffer po-string-buffer)
2706 (start po-string-start)
2707 (end po-string-end))
2708 ;; Try to fit the string in the displayed part of its window.
2718 ;; Highlight the string as found.
2733 (po-preset-string-functions)
2737 (setq data (apply po-find-string-function po-current-po-keywords nil))
2739 ;; Push the string just found into a work buffer for study.
2756 ;; No string left in this buffer.
2763 (setq po-string-contents (nth 0 data)
2764 po-string-buffer buffer
2765 po-string-start (nth 1 data)
2766 po-string-end (nth 2 data))))
2771 (defun po-mark-found-string (keyword)
2772 "Mark last found string in program sources as translatable, using KEYWORD."
2773 (if (not po-string-contents)
2774 (error (_"No such string")))
2776 (let ((contents po-string-contents)
2777 (buffer po-string-buffer)
2778 (start po-string-start)
2779 (end po-string-end)
2780 line string)
2781 ;; Mark string in program sources.
2785 (apply po-mark-string-function start end keyword nil))
2790 (buffer-file-name po-string-buffer)
2795 (po-update-mode-line-string))
2796 (setq po-string-contents nil)))
2799 "Mark last found string in program sources as translatable, using '_'."
2801 (po-mark-found-string "_"))
2804 "Mark last found string in program sources as translatable, ask for keywoard,
2811 (or po-string-contents (error (_"No such string")))
2816 (if (string-equal keyword "") (setq keyword default))
2817 (po-mark-found-string keyword))))
2822 (defun po-preset-string-functions ()
2825 (let ((pair (cond ((string-equal mode-name "AWK")
2826 '(po-find-awk-string . po-mark-awk-string))
2828 '(po-find-c-string . po-mark-c-string))
2829 ((string-equal mode-name "Emacs-Lisp")
2830 '(po-find-emacs-lisp-string . po-mark-emacs-lisp-string))
2831 ((string-equal mode-name "Python")
2832 '(po-find-python-string . po-mark-python-string))
2833 ((and (string-equal mode-name "Shell-script")
2834 (string-equal mode-line-process "[bash]"))
2835 '(po-find-bash-string . po-mark-bash-string))
2836 (t '(po-find-unknown-string . po-mark-unknown-string)))))
2837 (or (boundp 'po-find-string-function)
2838 (set (make-local-variable 'po-find-string-function) (car pair)))
2839 (or (boundp 'po-mark-string-function)
2840 (set (make-local-variable 'po-mark-string-function) (cdr pair)))))
2842 (defun po-find-unknown-string (keywords)
2843 "Dummy function to skip over a file, finding no string in it."
2846 (defun po-mark-unknown-string (start end keyword)
2847 "Dummy function to mark a given string. May not be called."
2853 (defun po-find-awk-string (keywords)
2854 "Find the next Awk string, excluding those marked by any of KEYWORDS.
2855 Return (CONTENTS START END) for the found string, or nil if none found."
2869 ;; Else find the end of the string.
2876 ;; Check before string either for underline, or for keyword
2897 (defun po-mark-awk-string (start end keyword)
2898 "Mark the Awk string, from START to END, with KEYWORD.
2899 Leave point after marked string."
2900 (if (string-equal keyword "_")
2914 (defun po-find-bash-string (keywords)
2915 "Find the next unmarked Bash string. KEYWORDS are merely ignored.
2916 Return (CONTENTS START END) for the found string, or nil if none found."
2930 ;; Else find the end of the double quoted string.
2937 ;; Check before string for dollar sign.
2947 (defun po-mark-bash-string (start end keyword)
2948 "Mark the Bash string, from START to END, with '$'. KEYWORD is ignored.
2949 Leave point after marked string."
2957 ;;; A few long string cases (submitted by Ben Pfaff).
2959 ;; #define string "This is a long string " \
2964 ;; char *x = "This is just an ordinary string "
2968 ;; char *y = "Here is a string continued across \
2973 ;;; End of long string cases.
2975 (defun po-find-c-string (keywords)
2976 "Find the next C string, excluding those marked by any of KEYWORDS.
2977 Returns (CONTENTS START END) for the found string, or nil if none found."
2996 ;; Else, find the end of the (possibly concatenated) string.
3007 ;; Check before string for keyword and opening parenthesis.
3028 ;; Return the found string, if any.
3032 (defun po-mark-c-string (start end keyword)
3033 "Mark the C string, from START to END, with KEYWORD.
3034 Leave point after marked string."
3040 (or (string-equal keyword "_") (insert " "))
3046 (defun po-find-emacs-lisp-string (keywords)
3047 "Find the next Emacs LISP string, excluding those marked by any of KEYWORDS.
3048 Returns (CONTENTS START END) for the found string, or nil if none found."
3058 ;; Else, find the end of the string.
3065 ;; Check before string for keyword and opening parenthesis.
3079 ;; Return the found string, if any.
3083 (defun po-mark-emacs-lisp-string (start end keyword)
3084 "Mark the Emacs LISP string, from START to END, with KEYWORD.
3085 Leave point after marked string."
3091 (or (string-equal keyword "_") (insert " "))))
3096 (defun po-find-python-string (keywords)
3097 "Find the next Python string, excluding those marked by any of KEYWORDS.
3098 Also disregard strings when preceded by an empty string of the other type.
3099 Returns (CONTENTS START END) for the found string, or nil if none found."
3108 ;; Quintuple-quoted string
3109 (po-skip-over-python-string))
3111 ;; Quadruple-quoted string
3112 (po-skip-over-python-string))
3114 ;; Simple-, double-, triple- or sextuple-quoted string.
3118 contents (po-skip-over-python-string)
3123 ;; Disregard a string used as a dictionary index.
3126 ;; Isolate the keyword which precedes string.
3137 ;; Return the found string, if any.
3140 (defun po-skip-over-python-string ()
3141 "Skip over a Python string, possibly made up of many concatenated parts.
3142 Leave point after string. Return unquoted overall string contents."
3154 ((looking-at "[rR]?\"\"\"") ; sextuple-quoted string
3161 ((looking-at "[rr]?'''") ; triple-quoted string
3168 ((looking-at "[rR]?\"") ; double-quoted string
3181 ((looking-at "[rR]?'") ; single-quoted string
3194 (t ; no string anymore
3206 (defun po-mark-python-string (start end keyword)
3207 "Mark the Python string, from START to END, with KEYWORD.
3208 If KEYWORD is '.', prefix the string with an empty string of the other type.
3209 Leave point after marked string."
3210 (cond ((string-equal keyword ".")
3230 (insert po-help-display-string)
3295 (>= (string-to-number
3297 (string-to-number (match-string 1))
3298 (string-to-number (match-string 2))
3299 (string-to-number (or (match-string 3) "0"))))
3322 (setq package (po-match-string 2)
3323 version (po-match-string 3)))
3324 (if (or (not package) (string-equal package "PACKAGE")
3325 (not version) (string-equal version "VERSION"))
3329 (string-match "^[^\\.]*\\.po\\'" filename))
3331 (string-match (concat (regexp-quote package)
3333 (if (not (equal version (po-match-string 1 filename)))
3337 (po-match-string 1 filename) version))))
3339 (if (stringp po-team-name-to-code)
3340 (setq team po-team-name-to-code)
3345 (let ((name (po-match-string 1)))
3347 (let ((pair (assoc name po-team-name-to-code)))
3350 (setq team (read-string (format "\
3351 Team name '%s' unknown. What is the team code? "
3353 (if (or (not team) (string-equal team "LL"))
3368 (setq team (po-match-string 2)))
3369 (if (or (not team) (string-equal team "LL"))
3371 (po-match-string 1))))
3384 (read-string (_"Subject? ")) nil)
3407 (read-string (_"Subject? "))