Mercurial > hg > xemacs-beta
comparison lib-src/make-msgfile.c @ 380:8626e4521993 r21-2-5
Import from CVS: tag r21-2-5
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:07:10 +0200 |
parents | 131b0175ea99 |
children |
comparison
equal
deleted
inserted
replaced
379:76b7d63099ad | 380:8626e4521993 |
---|---|
67 level place. | 67 level place. |
68 | 68 |
69 This program (make-msgfile.c) addresses the first part, extracting the | 69 This program (make-msgfile.c) addresses the first part, extracting the |
70 strings. | 70 strings. |
71 | 71 |
72 For the emacs C code, we need to recognise the following patterns: | 72 For the emacs C code, we need to recognize the following patterns: |
73 | 73 |
74 message ("string" ... ) | 74 message ("string" ... ) |
75 error ("string") | 75 error ("string") |
76 report_file_error ("string" ... ) | 76 report_file_error ("string" ... ) |
77 signal_simple_error ("string" ... ) | 77 signal_simple_error ("string" ... ) |
92 #### When we've got a string which is a candidate for translation, we | 92 #### When we've got a string which is a candidate for translation, we |
93 should ignore it if it contains only format directives, that is, if | 93 should ignore it if it contains only format directives, that is, if |
94 there are no alphabetic characters in it that are not a part of a `%' | 94 there are no alphabetic characters in it that are not a part of a `%' |
95 directive. (Careful not to translate either "%s%s" or "%s: ".) | 95 directive. (Careful not to translate either "%s%s" or "%s: ".) |
96 | 96 |
97 For the emacs Lisp code, we need to recognise the following patterns: | 97 For the emacs Lisp code, we need to recognize the following patterns: |
98 | 98 |
99 (message "string" ... ) | 99 (message "string" ... ) |
100 (error "string" ... ) | 100 (error "string" ... ) |
101 (format "string" ... ) | 101 (format "string" ... ) |
102 (read-from-minibuffer "string" ... ) | 102 (read-from-minibuffer "string" ... ) |
107 (temp-minibuffer-message "string") | 107 (temp-minibuffer-message "string") |
108 (query-replace-read-args "string" ... ) | 108 (query-replace-read-args "string" ... ) |
109 | 109 |
110 I expect there will be a lot like the above; basically, any function which | 110 I expect there will be a lot like the above; basically, any function which |
111 is a commonly used wrapper around an eventual call to `message' or | 111 is a commonly used wrapper around an eventual call to `message' or |
112 `read-from-minibuffer' needs to be recognised by this program. | 112 `read-from-minibuffer' needs to be recognized by this program. |
113 | 113 |
114 | 114 |
115 (dgettext "domain-name" "string") #### do we still need this? | 115 (dgettext "domain-name" "string") #### do we still need this? |
116 | 116 |
117 things that should probably be restructured: | 117 things that should probably be restructured: |
122 | 122 |
123 | 123 |
124 Menu descriptors: one way to extract the strings in menu labels would be | 124 Menu descriptors: one way to extract the strings in menu labels would be |
125 to teach this program about "^(defvar .*menu\n" forms; that's probably | 125 to teach this program about "^(defvar .*menu\n" forms; that's probably |
126 kind of hard, though, so perhaps a better approach would be to make this | 126 kind of hard, though, so perhaps a better approach would be to make this |
127 program recognise lines of the form | 127 program recognize lines of the form |
128 | 128 |
129 "string" ... ;###translate | 129 "string" ... ;###translate |
130 | 130 |
131 where the magic token ";###translate" on a line means that the string | 131 where the magic token ";###translate" on a line means that the string |
132 constant on this line should go into the message catalog. This is analagous | 132 constant on this line should go into the message catalog. This is analagous |