Mercurial > hg > xemacs-beta
comparison lib-src/make-msgfile.lex @ 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 | 74fd4e045ea6 |
comparison
equal
deleted
inserted
replaced
379:76b7d63099ad | 380:8626e4521993 |
---|---|
132 level place. | 132 level place. |
133 | 133 |
134 This program (make-msgfile.c) addresses the first part, extracting the | 134 This program (make-msgfile.c) addresses the first part, extracting the |
135 strings. | 135 strings. |
136 | 136 |
137 For the emacs C code, we need to recognise the following patterns: | 137 For the emacs C code, we need to recognize the following patterns: |
138 | 138 |
139 message ("string" ... ) | 139 message ("string" ... ) |
140 error ("string") | 140 error ("string") |
141 report_file_error ("string" ... ) | 141 report_file_error ("string" ... ) |
142 signal_simple_error ("string" ... ) | 142 signal_simple_error ("string" ... ) |
157 #### When we've got a string which is a candidate for translation, we | 157 #### When we've got a string which is a candidate for translation, we |
158 should ignore it if it contains only format directives, that is, if | 158 should ignore it if it contains only format directives, that is, if |
159 there are no alphabetic characters in it that are not a part of a `%' | 159 there are no alphabetic characters in it that are not a part of a `%' |
160 directive. (Careful not to translate either "%s%s" or "%s: ".) | 160 directive. (Careful not to translate either "%s%s" or "%s: ".) |
161 | 161 |
162 For the emacs Lisp code, we need to recognise the following patterns: | 162 For the emacs Lisp code, we need to recognize the following patterns: |
163 | 163 |
164 (message "string" ... ) | 164 (message "string" ... ) |
165 (error "string" ... ) | 165 (error "string" ... ) |
166 (format "string" ... ) | 166 (format "string" ... ) |
167 (read-from-minibuffer "string" ... ) | 167 (read-from-minibuffer "string" ... ) |
172 (temp-minibuffer-message "string") | 172 (temp-minibuffer-message "string") |
173 (query-replace-read-args "string" ... ) | 173 (query-replace-read-args "string" ... ) |
174 | 174 |
175 I expect there will be a lot like the above; basically, any function which | 175 I expect there will be a lot like the above; basically, any function which |
176 is a commonly used wrapper around an eventual call to `message' or | 176 is a commonly used wrapper around an eventual call to `message' or |
177 `read-from-minibuffer' needs to be recognised by this program. | 177 `read-from-minibuffer' needs to be recognized by this program. |
178 | 178 |
179 | 179 |
180 (dgettext "domain-name" "string") #### do we still need this? | 180 (dgettext "domain-name" "string") #### do we still need this? |
181 | 181 |
182 things that should probably be restructured: | 182 things that should probably be restructured: |
216 come from a .el or .elc file as already translated. | 216 come from a .el or .elc file as already translated. |
217 | 217 |
218 Menu descriptors: one way to extract the strings in menu labels would be | 218 Menu descriptors: one way to extract the strings in menu labels would be |
219 to teach this program about "^(defvar .*menu\n" forms; that's probably | 219 to teach this program about "^(defvar .*menu\n" forms; that's probably |
220 kind of hard, though, so perhaps a better approach would be to make this | 220 kind of hard, though, so perhaps a better approach would be to make this |
221 program recognise lines of the form | 221 program recognize lines of the form |
222 | 222 |
223 "string" ... ;###translate | 223 "string" ... ;###translate |
224 | 224 |
225 where the magic token ";###translate" on a line means that the string | 225 where the magic token ";###translate" on a line means that the string |
226 constant on this line should go into the message catalog. This is analagous | 226 constant on this line should go into the message catalog. This is analagous |