Merge lp:~chromakode/boots/localization into lp:boots
- localization
- Merge into trunk
Proposed by
Max Goodhart
Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp:~chromakode/boots/localization |
Merge into: | lp:boots |
Diff against target: |
1323 lines (+536/-96) 24 files modified
boots/api/__init__.py (+1/-0) boots/api/api.py (+5/-4) boots/api/constructors.py (+5/-3) boots/api/errors.py (+4/-2) boots/app/__init__.py (+1/-1) boots/app/client_config.py (+19/-17) boots/lib/__init__.py (+4/-0) boots/lib/console.py (+20/-17) boots/lib/lingos/bash_external.py (+2/-2) boots/lib/lingos/lingo.py (+3/-1) boots/lib/lingos/lisp/builtins.py (+5/-3) boots/lib/lingos/lisp/lexer.py (+3/-1) boots/lib/lingos/lisp/lisp.py (+7/-4) boots/lib/lingos/lisp/objects.py (+12/-10) boots/lib/lingos/lisp/parser.py (+5/-2) boots/lib/lingos/piped_sql.py (+8/-6) boots/lib/lingos/python.py (+2/-1) boots/lib/lingos/sql.py (+2/-1) boots/lib/ui/components/help.py (+6/-4) boots/lib/ui/components/metacommands.py (+3/-2) boots/lib/ui/plain.py (+24/-15) po/README.txt (+16/-0) po/boots.pot (+376/-0) po/createpots.sh (+3/-0) |
To merge this branch: | bzr merge lp:~chromakode/boots/localization |
Related bugs: | |
Related blueprints: |
Boots Localization
(High)
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Boots Developers | Pending | ||
Review via email: mp+20850@code.launchpad.net |
Commit message
Description of the change
Ken's localization branch + updates and fixes
To post a comment you must log in.
- 117. By Max Goodhart
-
Fix a couple translatable strings in client_config.py.
- 118. By Max Goodhart
-
Fix translatable strings again.
- 119. By Max Goodhart
-
Localize boots.api.
- 120. By Max Goodhart
-
Merge and localize latest updates to trunk.
- 121. By Max Goodhart
-
Update potfile.
- 122. By Max Goodhart
-
Update localization README.
- 123. By Max Goodhart
-
Fix another translatable string that slipped through.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'boots/api/__init__.py' |
2 | --- boots/api/__init__.py 2009-12-22 00:12:18 +0000 |
3 | +++ boots/api/__init__.py 2010-03-07 09:23:22 +0000 |
4 | @@ -0,0 +1,1 @@ |
5 | +from boots.lib import _, n_ |
6 | \ No newline at end of file |
7 | |
8 | === modified file 'boots/api/api.py' |
9 | --- boots/api/api.py 2010-03-05 21:07:26 +0000 |
10 | +++ boots/api/api.py 2010-03-07 09:23:22 +0000 |
11 | @@ -31,6 +31,7 @@ |
12 | import time |
13 | from boots.api import errors |
14 | from boots.api.nodes.node import Status |
15 | +from boots.api import _, n_ |
16 | |
17 | _server_classes = [] |
18 | |
19 | @@ -85,7 +86,7 @@ |
20 | try: |
21 | self._connection = self._connect() |
22 | except self.db.Error: |
23 | - raise errors.ConnectionError("Could not connect to {0}".format(self)) |
24 | + raise errors.ConnectionError(_("Could not connect to {0}").format(self)) |
25 | |
26 | @property |
27 | def is_connected(self): |
28 | @@ -97,7 +98,7 @@ |
29 | def _check_connected(self): |
30 | """Raise a ProgrammingError if the Connection has been closed.""" |
31 | if not self.is_connected: |
32 | - raise errors.ConnectionError("Connection closed") |
33 | + raise errors.ConnectionError(_("Connection closed")) |
34 | |
35 | def disconnect(self): |
36 | self._check_connected() |
37 | @@ -120,7 +121,7 @@ |
38 | except errors.LostConnectionError as lost_e: |
39 | # FIXME: this is NOT thread safe |
40 | # Attempt to reconnect and retry |
41 | - yield Status("Lost connection to {0}. Reconnecting...".format(self)) |
42 | + yield Status(_("Lost connection to {0}. Reconnecting...").format(self)) |
43 | |
44 | if self.is_connected: |
45 | self.disconnect() |
46 | @@ -132,7 +133,7 @@ |
47 | lost_e.reconnect_exception = e |
48 | raise lost_e |
49 | else: |
50 | - yield Status("Reconnected.") |
51 | + yield Status(_("Reconnected.")) |
52 | |
53 | if cursor.description: |
54 | field_indexes = extract_field_indexes(cursor.description) |
55 | |
56 | === modified file 'boots/api/constructors.py' |
57 | --- boots/api/constructors.py 2010-03-07 07:24:29 +0000 |
58 | +++ boots/api/constructors.py 2010-03-07 09:23:22 +0000 |
59 | @@ -21,9 +21,11 @@ |
60 | # |
61 | # ##### END LICENSE BLOCK ##### |
62 | |
63 | +import re |
64 | + |
65 | from boots.api.api import Rows, ResultInfo |
66 | from boots.api.nodes.node import NodeGraph, SyncNode, IteratorNode |
67 | -import re |
68 | +from boots.api import _, n_ |
69 | |
70 | _constructors = {} |
71 | |
72 | @@ -31,7 +33,7 @@ |
73 | """Allow the function constructor to be used from PipedSQL under name. constructor is a |
74 | function that takes any number of strings as arguments and returns a node.""" |
75 | if name in _constructors: |
76 | - raise KeyError('A constructor with name ' + name + ' already exists') |
77 | + raise KeyError(_('A constructor with name {0} already exists').format(name)) |
78 | |
79 | _constructors[name] = constructor |
80 | |
81 | @@ -42,7 +44,7 @@ |
82 | def construct(name, *arguments): |
83 | """Contructs a node using the given name and arguments.""" |
84 | if name not in _constructors: |
85 | - raise KeyError('There is no constructor with the name' + ' {0}.'.format(name)) |
86 | + raise KeyError(_('There is no constructor with the name {0}.').format(name)) |
87 | |
88 | return _constructors[name](*arguments) |
89 | |
90 | |
91 | === modified file 'boots/api/errors.py' |
92 | --- boots/api/errors.py 2010-03-05 22:13:28 +0000 |
93 | +++ boots/api/errors.py 2010-03-07 09:23:22 +0000 |
94 | @@ -24,6 +24,8 @@ |
95 | import exceptions |
96 | import traceback |
97 | |
98 | +from boots.api import _, n_ |
99 | + |
100 | class BootsError(exceptions.StandardError): |
101 | """Base class of boots error exceptions.""" |
102 | pass |
103 | @@ -48,11 +50,11 @@ |
104 | if self.msg: |
105 | msg.append(self.msg) |
106 | else: |
107 | - msg.append("Lost connection to {0}".format(self.server)) |
108 | + msg.append(_("Lost connection to {0}").format(self.server)) |
109 | |
110 | if self.reconnect_exception: |
111 | exc_lines = traceback.format_exception_only(type(self.reconnect_exception), self.reconnect_exception) |
112 | exc_text = ". ".join(line.strip() for line in exc_lines) |
113 | - msg.append("(Exception upon reconnect: {0})".format(exc_text)) |
114 | + msg.append(_("(Exception upon reconnect: {0})").format(exc_text)) |
115 | |
116 | return " ".join(msg) |
117 | |
118 | === modified file 'boots/app/__init__.py' |
119 | --- boots/app/__init__.py 2009-12-23 20:58:28 +0000 |
120 | +++ boots/app/__init__.py 2010-03-07 09:23:22 +0000 |
121 | @@ -1,1 +1,1 @@ |
122 | -__all__ = ["boots", "config", "info"] |
123 | +from boots.lib import _, n_ |
124 | \ No newline at end of file |
125 | |
126 | === modified file 'boots/app/client_config.py' |
127 | --- boots/app/client_config.py 2010-03-01 08:03:27 +0000 |
128 | +++ boots/app/client_config.py 2010-03-07 09:23:22 +0000 |
129 | @@ -29,6 +29,8 @@ |
130 | import os, os.path |
131 | import info |
132 | |
133 | +from boots.app import _, n_ |
134 | + |
135 | def find_executable(name): |
136 | # Search algorithm adapted from os._execvpe |
137 | head, tail = os.path.split(name) |
138 | @@ -88,71 +90,71 @@ |
139 | action = "store", |
140 | type = "string", |
141 | dest = "command", |
142 | - help = "Execute command and exit") |
143 | + help = _("Execute command and exit")) |
144 | self._cli_parser.add_option("-D", "--database", |
145 | action = "store", |
146 | type = "string", |
147 | dest = "database", |
148 | - help = "Use database") |
149 | + help = _("Use database")) |
150 | self._cli_parser.add_option("-f", "--script", |
151 | action = "store", |
152 | type = "string", |
153 | dest = "script", |
154 | - help = "Execute commands from file and exit") |
155 | + help = _("Execute commands from file and exit")) |
156 | self._cli_parser.add_option('-l', '--lingo', |
157 | action = 'store', |
158 | type = 'string', |
159 | dest = 'lingo', |
160 | - help = 'Set the lingo to use') |
161 | + help = _('Set the lingo to use')) |
162 | self._cli_parser.add_option("-X", "--norc", |
163 | action = "store_true", |
164 | dest = "norc", |
165 | - help = "Do not read user configuration file") |
166 | + help = _("Do not read user configuration file")) |
167 | self._cli_parser.add_option("-r", "--rc", |
168 | action = "store", |
169 | type = "string", |
170 | dest = "rcfile", |
171 | - help = "Filename of user configuration file") |
172 | + help = _("Filename of user configuration file")) |
173 | self._cli_parser.add_option("-H", "--host", |
174 | action = "store", |
175 | type = "string", |
176 | dest = "host", |
177 | - help = "Connect to host") |
178 | + help = _("Connect to host")) |
179 | self._cli_parser.add_option("-p", "--port", |
180 | action = "store", |
181 | type = "int", |
182 | dest = "port", |
183 | - help = "Use port number") |
184 | + help = _("Use port number")) |
185 | self._cli_parser.add_option("-u", "--user", |
186 | action = "store", |
187 | type = "string", |
188 | dest = "username", |
189 | - help = "Login with username") |
190 | + help = _("Login with username")) |
191 | self._cli_parser.add_option("-P", "--password", |
192 | action = "store", |
193 | type = "string", |
194 | dest = "password", |
195 | - help = "Connect using password. If none is given, query for password") |
196 | + help = _("Connect using password. If none is given, query for password")) |
197 | self._cli_parser.add_option("--pager", |
198 | action = "store", |
199 | type = "string", |
200 | dest = "pager", |
201 | - help = "Pipe query results to the specified pager.") |
202 | + help = _("Pipe query results to the specified pager.")) |
203 | self._cli_parser.add_option("-t", "--terminatingchar", |
204 | action = "store", |
205 | type = "string", |
206 | dest = "terminating_char", |
207 | - help = "Specify the SQL statement terminating character. Default is ';'.") |
208 | + help = _("Specify the SQL statement terminating character. Default is ';'.")) |
209 | self._cli_parser.add_option("-F", "--historyfile", |
210 | action = "store", |
211 | type = "string", |
212 | dest = "history_file", |
213 | - help = "Specify file to save history to") |
214 | + help = _("Specify file to save history to")) |
215 | self._cli_parser.add_option("-L", "--historylength", |
216 | action = "store", |
217 | type = "int", |
218 | dest = "history_length", |
219 | - help = "Specify max history file length") |
220 | + help = _("Specify max history file length")) |
221 | |
222 | def __getitem__(self, key): |
223 | """Allows one to use the [] operator to get config items.""" |
224 | @@ -200,11 +202,11 @@ |
225 | except IOError: |
226 | if filepath != info.RCFILE: |
227 | # Only print an error if a non-default rc file was specified. |
228 | - print("rcfile {0} not found".format(filepath)) |
229 | + print(_("rcfile {0} not found").format(filepath)) |
230 | except SyntaxError: |
231 | - print("rcfile {0} contains a syntax error".format(filepath)) |
232 | + print(_("rcfile {0} contains a syntax error").format(filepath)) |
233 | except Exception as e: |
234 | - print("rcfile {0} contains an error: {1}".format(filepath, e)) |
235 | + print(_("rcfile {0} contains an error: {1}").format(filepath, e)) |
236 | return file_dict |
237 | |
238 | def get_cli_conf(self): |
239 | |
240 | === modified file 'boots/lib/__init__.py' |
241 | --- boots/lib/__init__.py 2009-12-22 00:12:18 +0000 |
242 | +++ boots/lib/__init__.py 2010-03-07 09:23:22 +0000 |
243 | @@ -0,0 +1,4 @@ |
244 | +import gettext |
245 | +translation = gettext.translation("boots", fallback=True) |
246 | +_ = translation.lgettext |
247 | +n_ = translation.lngettext |
248 | \ No newline at end of file |
249 | |
250 | === modified file 'boots/lib/console.py' |
251 | --- boots/lib/console.py 2010-03-07 06:42:10 +0000 |
252 | +++ boots/lib/console.py 2010-03-07 09:23:22 +0000 |
253 | @@ -24,6 +24,8 @@ |
254 | """This module provides the boots Console class. This class is the core |
255 | driver of any boots client.""" |
256 | |
257 | +import sys |
258 | + |
259 | from boots.api import api |
260 | from boots.api.errors import BootsError, BootsWarning, ConnectionError |
261 | from boots.api.nodes.node import NodeGraph, IteratorNode, LinkStackNode |
262 | @@ -37,6 +39,7 @@ |
263 | from boots.lib.lingos import python |
264 | from boots.lib.lingos import piped_sql |
265 | from boots.lib.lingos import sql |
266 | +from boots.lib import _, n_ |
267 | try: |
268 | from boots.lib.lingos.lisp import lisp |
269 | except ImportError: |
270 | @@ -63,7 +66,7 @@ |
271 | self.exception = exception |
272 | |
273 | def __str__(self): |
274 | - return "Boots encountered an internal error: {0}".format(self.exception) |
275 | + return _("Boots encountered an internal error: {0}").format(self.exception) |
276 | |
277 | class Console(object): |
278 | def __init__(self, config, welcome_msg=None): |
279 | @@ -113,20 +116,20 @@ |
280 | self.hooks["load"].call() |
281 | |
282 | def _init_help(self): |
283 | - self.help = HelpTopic("boots", "Boots Help", "Help", """ |
284 | - Boots is a flexible, extensible, and multilingual shell for working with databases. To read more about a subtopic, use `help <topic>`.""") |
285 | + self.help = HelpTopic("boots", _("Boots Help"), _("Help"), |
286 | + description = _("Boots is a flexible, extensible, and multilingual shell for working with databases. To read more about a subtopic, use `help <topic>`.")) |
287 | |
288 | self.help["commands"] = QueryIndexTopic("commands", None, |
289 | - "List of Boots commands.", |
290 | + _("List of Boots commands."), |
291 | query=("commands",)) |
292 | |
293 | - self.help["commands"].add("\quit", "quit", "Quit boots.") |
294 | - self.help["commands"].add("\help", "help", "Show help for a topic.", """ |
295 | - help <topic> |
296 | - Show help for \"topic\".""") |
297 | + self.help["commands"].add("\quit", _("quit"), _("Quit boots.")) |
298 | + self.help["commands"].add("\help", _("help"), _("Show help for a topic."), |
299 | + description = _("help <topic>\n" |
300 | + "Show help for \"topic\".")) |
301 | |
302 | - self.help.add("lingos", "Lingos", "Documentation for loaded lingos.", """ |
303 | - A lingo is a command language usable within Boots.""") |
304 | + self.help.add("lingos", _("Lingos"), _("Documentation for loaded lingos."), |
305 | + description = _("A lingo is a command language usable within Boots.")) |
306 | |
307 | def input_complete(self, command, lingo): |
308 | if self.metacommands.get_metacommand(command) is not None: |
309 | @@ -138,7 +141,7 @@ |
310 | |
311 | def run(self, command, lingo="sql"): |
312 | if not lingo in self.lingos: |
313 | - self._display_error(ConsoleError("Invalid lingo \"{0}\" specified.".format(lingo))) |
314 | + self._display_error(ConsoleError(_("Invalid lingo \"{0}\" specified.").format(lingo))) |
315 | return |
316 | |
317 | result_data = self.lingos[lingo].execute(command) |
318 | @@ -167,7 +170,7 @@ |
319 | self.servers.append(server) |
320 | return True |
321 | else: |
322 | - self._display_error(ConsoleError("Could not connect to {0}:{1}".format(host, port))) |
323 | + self._display_error(ConsoleError(_("Could not connect to {0}:{1}").format(host, port))) |
324 | return False |
325 | |
326 | def disconnect(self, host, port): |
327 | @@ -186,7 +189,7 @@ |
328 | if self.welcome_msg and self.driver.is_interactive: |
329 | server_lines = [] |
330 | for server in self.servers: |
331 | - line_format = "{0.hostname}:{0.port} (server v{0.server_version})" |
332 | + line_format = _("{0.hostname}:{0.port} (server v{0.server_version})") |
333 | server_lines.append(line_format.format(server)) |
334 | server_status = "\n".join(server_lines) |
335 | |
336 | @@ -221,7 +224,7 @@ |
337 | |
338 | def quit(self, exitcode=0): |
339 | if self.driver.is_interactive: |
340 | - self.presenter.presenter_graph.put("Boots quit.") |
341 | + self.presenter.presenter_graph.put(_("Boots quit.")) |
342 | |
343 | self.hooks["unload"].call() |
344 | self.disconnect(None, None) |
345 | @@ -239,9 +242,9 @@ |
346 | self.presenter.present(topic.format(include_index=True)) |
347 | else: |
348 | paths = ", ".join("\"{0}\"".format(" ".join(path)) for path in results) |
349 | - self.presenter.present("Did you mean: {0}?".format(paths)) |
350 | + self.presenter.present(_("Did you mean: {0}?").format(paths)) |
351 | else: |
352 | - self.presenter.present("No help found for \"{0}\".".format(" ".join(query))) |
353 | + self.presenter.present(_("No help found for \"{0}\".").format(" ".join(query))) |
354 | |
355 | def meta_connect(self, host=None, port=None, database=None): |
356 | if host is None: |
357 | @@ -270,7 +273,7 @@ |
358 | try: |
359 | script_driver = ScriptDriver(self, filepath, self.config["lingo"]) |
360 | except IOError as e: |
361 | - self._display_error(ConsoleError("Could not open file {0}".format(filepath))) |
362 | + self._display_error(ConsoleError(_("Could not open file {0}").format(filepath))) |
363 | return |
364 | |
365 | self.driver_stack.push_input(script_driver.driver_graph.output_link) |
366 | |
367 | === modified file 'boots/lib/lingos/bash_external.py' |
368 | --- boots/lib/lingos/bash_external.py 2010-02-27 05:54:13 +0000 |
369 | +++ boots/lib/lingos/bash_external.py 2010-03-07 09:23:22 +0000 |
370 | @@ -25,12 +25,12 @@ |
371 | from boots.lib.lingos import external |
372 | from boots.lib.lingos import lingo |
373 | from boots.lib.ui.components.help import HelpTopic |
374 | - |
375 | +from boots.lib import _, n_ |
376 | |
377 | class ExternalBashInterpreter(external.ExternalInterpreter): |
378 | """Provides an interface to an external bash shell.""" |
379 | |
380 | - help = HelpTopic("bash", "Bash Lingo", "External bash shell.") |
381 | + help = HelpTopic("bash", _("Bash Lingo"), _("External bash shell.")) |
382 | |
383 | def __init__(self, *args, **kwargs): |
384 | super(ExternalBashInterpreter, self).__init__('bash', [], *args, **kwargs) |
385 | |
386 | === modified file 'boots/lib/lingos/lingo.py' |
387 | --- boots/lib/lingos/lingo.py 2010-03-04 19:09:05 +0000 |
388 | +++ boots/lib/lingos/lingo.py 2010-03-07 09:23:22 +0000 |
389 | @@ -23,6 +23,8 @@ |
390 | |
391 | import sys |
392 | |
393 | +from boots.lib import _, n_ |
394 | + |
395 | class LingoRegistry(object): |
396 | def __init__(self): |
397 | self._lingos = {} |
398 | @@ -31,7 +33,7 @@ |
399 | """Registers a lingo with the given name and interpreter. Raises a KeyError if a lingo with |
400 | name is already registered.""" |
401 | if name in self._lingos: |
402 | - raise KeyError('A lingo with name {0} already exists'.format(name)) |
403 | + raise KeyError(_('A lingo with name {0} already exists').format(name)) |
404 | |
405 | self._lingos[name] = interpreter |
406 | |
407 | |
408 | === modified file 'boots/lib/lingos/lisp/builtins.py' |
409 | --- boots/lib/lingos/lisp/builtins.py 2010-02-27 05:40:10 +0000 |
410 | +++ boots/lib/lingos/lisp/builtins.py 2010-03-07 09:23:22 +0000 |
411 | @@ -21,8 +21,10 @@ |
412 | # |
413 | # ##### END LICENSE BLOCK ##### |
414 | |
415 | +import sys |
416 | + |
417 | from boots.lib.lingos.lisp import objects |
418 | -import sys |
419 | +from boots.lib import _, n_ |
420 | |
421 | nil = objects.Null() |
422 | t = objects.T() |
423 | @@ -57,7 +59,7 @@ |
424 | elif isinstance(s, objects.String): |
425 | return objects.Integer(len(s.python_string())) |
426 | else: |
427 | - raise TypeError('Expected a cons, nil or a string') |
428 | + raise TypeError(_('Expected a cons, nil or a string')) |
429 | |
430 | def elt_function(s, i): |
431 | """Returns the ith element of the sequence s.""" |
432 | @@ -66,7 +68,7 @@ |
433 | elif isinstance(s, objects.String): |
434 | return s.python_string()[i.python_integer()] |
435 | else: |
436 | - raise TypeError('Expected a cons or string') |
437 | + raise TypeError(_('Expected a cons or string')) |
438 | |
439 | def gensym_function(): |
440 | """Returns a unique symbol that will never be the same as any other symbol even if it has the same name.""" |
441 | |
442 | === modified file 'boots/lib/lingos/lisp/lexer.py' |
443 | --- boots/lib/lingos/lisp/lexer.py 2010-02-27 05:40:10 +0000 |
444 | +++ boots/lib/lingos/lisp/lexer.py 2010-03-07 09:23:22 +0000 |
445 | @@ -23,6 +23,8 @@ |
446 | |
447 | import ply.lex as lex |
448 | |
449 | +from boots.lib import _, n_ |
450 | + |
451 | tokens = ('INTEGER', 'STRING', 'SYMBOL', 'QUOTE', 'LEFT_PAREN', 'RIGHT_PAREN') |
452 | |
453 | t_INTEGER = r'[0-9]+' |
454 | @@ -34,7 +36,7 @@ |
455 | t_ignore = ' \t\n' |
456 | |
457 | def t_error(t): |
458 | - print('illegal character {0} found'.format(t.value)) |
459 | + print(_('illegal character {0} found').format(t.value)) |
460 | token.lexer.skip(1) |
461 | |
462 | lexer = lex.lex() |
463 | |
464 | === modified file 'boots/lib/lingos/lisp/lisp.py' |
465 | --- boots/lib/lingos/lisp/lisp.py 2010-03-07 06:59:29 +0000 |
466 | +++ boots/lib/lingos/lisp/lisp.py 2010-03-07 09:23:22 +0000 |
467 | @@ -35,13 +35,16 @@ |
468 | if __name__ == '__main__': |
469 | sys.path.append('../../../../') |
470 | |
471 | +import re |
472 | +import readline |
473 | + |
474 | from boots.lib.lingos import lingo |
475 | from boots.lib.lingos.lisp import builtins |
476 | from boots.lib.lingos.lisp import lexer |
477 | from boots.lib.lingos.lisp import objects |
478 | from boots.lib.lingos.lisp import parser |
479 | -import re |
480 | -import readline |
481 | +from boots.lib import _, n_ |
482 | + |
483 | |
484 | def input_complete(string): |
485 | """Returns string if string is a complete lisp expression. Otherwise, None is returned.""" |
486 | @@ -52,7 +55,7 @@ |
487 | paren_level = left_parens - right_parens |
488 | |
489 | if paren_level < 0: |
490 | - raise SyntaxError('unmatched closing ")"') |
491 | + raise SyntaxError(_('unmatched closing ")"')) |
492 | elif paren_level > 0: |
493 | return None |
494 | else: |
495 | @@ -71,7 +74,7 @@ |
496 | if isinstance(stream, file): |
497 | stream = stream.readline |
498 | elif not callable(stream): |
499 | - raise TypeError('{0} is not a stream or a callable'.format(stream)) |
500 | + raise TypeError(_('{0} is not a stream or a callable').format(stream)) |
501 | # Read lines until all open lisp expressions have been closed. |
502 | while True: |
503 | line = stream() |
504 | |
505 | === modified file 'boots/lib/lingos/lisp/objects.py' |
506 | --- boots/lib/lingos/lisp/objects.py 2010-02-27 05:40:10 +0000 |
507 | +++ boots/lib/lingos/lisp/objects.py 2010-03-07 09:23:22 +0000 |
508 | @@ -25,6 +25,8 @@ |
509 | import copy |
510 | import sys |
511 | |
512 | +from boots.lib import _, n_ |
513 | + |
514 | _gensym_count = 1 |
515 | _symbols = {} |
516 | |
517 | @@ -96,7 +98,7 @@ |
518 | else_expression = car(cdr(cdr(cdr(self)))) |
519 | |
520 | if then_expression is Null() or cdr(cdr(cdr(cdr(self)))) is not Null(): |
521 | - raise SyntaxError('wrong number of arguments for if special form {0}'.format(self)) |
522 | + raise SyntaxError(_('Wrong number of arguments for if special form {0}').format(self)) |
523 | |
524 | if condition_expression.evaluate(environment) != Null(): |
525 | return then_expression.evaluate(environment) |
526 | @@ -115,7 +117,7 @@ |
527 | values = arguments[2::2] |
528 | |
529 | if len(symbols) != len(values) or len(symbols) == 0: |
530 | - raise SyntaxError('The number of symbols must equal the number of values and must be non-zero') |
531 | + raise SyntaxError(_('The number of symbols must equal the number of values and must be non-zero')) |
532 | |
533 | for symbol, value in zip(symbols, values): |
534 | value = value.evaluate(environment) |
535 | @@ -129,7 +131,7 @@ |
536 | else: # Handle function calls. |
537 | function = self.car.evaluate(environment) |
538 | if not isinstance(function, Lambda): |
539 | - raise TypeError('Expected a function') |
540 | + raise TypeError(_('Expected a function')) |
541 | else: |
542 | return function.call((argument.evaluate(environment) for argument in self.python_list()[1:]), environment) |
543 | |
544 | @@ -165,18 +167,18 @@ |
545 | def __getitem__(self, symbol): |
546 | """Returns the value of symbol in the environment.""" |
547 | if not isinstance(symbol, Symbol): |
548 | - raise TypeError('Expected a symbol') |
549 | + raise TypeError(_('Expected a symbol')) |
550 | |
551 | try: |
552 | return self._environment[symbol][-1] |
553 | except KeyError: |
554 | - raise KeyError('No binding for {0} exists in the current environment'.format(symbol)) |
555 | + raise KeyError(_('No binding for {0} exists in the current environment').format(symbol)) |
556 | |
557 | def __setitem__(self, symbol, value): |
558 | - """Sets symbol to value in the environment. If no binding for symbol exists, a binding is created at the innermost |
559 | + """Sets symbol to value in the environment. If no binding for symbol exists, a binding is created at the innermost |
560 | scope.""" |
561 | if not isinstance(symbol, Symbol): |
562 | - raise TypeError('Expected a symbol') |
563 | + raise TypeError(_('Expected a symbol')) |
564 | |
565 | if symbol not in self._environment: |
566 | self._environment[symbol] = [value] |
567 | @@ -188,7 +190,7 @@ |
568 | # def __delitem__(self, symbol): |
569 | # """Removes the first binding found for symbol. Returns True if the symbol is found and False otherwise.""" |
570 | # if not isinstance(symbol, Symbol): |
571 | - # raise TypeError('Expected a symbol') |
572 | + # raise TypeError(_('Expected a symbol')) |
573 | |
574 | # if symbol in self._environment: |
575 | # self._environment[symbol].pop() |
576 | @@ -202,7 +204,7 @@ |
577 | # return False |
578 | |
579 | def push(self, symbol_values): |
580 | - """Adds a new innermost lexical scope as determined by symbol_values. symbol_values is a dictionary mapping Symbols |
581 | + """Adds a new innermost lexical scope as determined by symbol_values. symbol_values is a dictionary mapping Symbols |
582 | to Objects and describes bindings in the current scope.""" |
583 | self._scopes.append(set(symbol_values.keys())) |
584 | |
585 | @@ -215,7 +217,7 @@ |
586 | def pop(self): |
587 | """Removes the innermost scope and returns a dictionary that corresponds to its bindings.""" |
588 | if len(self._scopes) <= 1: |
589 | - raise RuntimeError('Cannot pop the innermost scope because then no scopes would remain') |
590 | + raise RuntimeError(_('Cannot pop the innermost scope because then no scopes would remain')) |
591 | symbols = self._scopes.pop() |
592 | |
593 | for symbol in symbols: |
594 | |
595 | === modified file 'boots/lib/lingos/lisp/parser.py' |
596 | --- boots/lib/lingos/lisp/parser.py 2010-03-07 06:54:29 +0000 |
597 | +++ boots/lib/lingos/lisp/parser.py 2010-03-07 09:23:22 +0000 |
598 | @@ -22,9 +22,12 @@ |
599 | # ##### END LICENSE BLOCK ##### |
600 | |
601 | from lexer import tokens |
602 | +import ply.yacc as yacc |
603 | + |
604 | from boots.lib.lingos.lisp import builtins |
605 | from boots.lib.lingos.lisp import objects |
606 | -import ply.yacc as yacc |
607 | +from boots.lib import _, n_ |
608 | + |
609 | |
610 | def p_expression_integer(p): |
611 | 'expression : INTEGER' |
612 | @@ -59,7 +62,7 @@ |
613 | p[0] = objects.Cons(p[1], p[2]) |
614 | |
615 | def p_error(p): |
616 | - raise SyntaxError('syntax error') |
617 | + raise SyntaxError(_('syntax error')) |
618 | |
619 | # Disable debugging output and caching of parse tables. |
620 | parser = yacc.yacc(debug = 0, write_tables = 0) |
621 | |
622 | === modified file 'boots/lib/lingos/piped_sql.py' |
623 | --- boots/lib/lingos/piped_sql.py 2010-03-07 07:24:29 +0000 |
624 | +++ boots/lib/lingos/piped_sql.py 2010-03-07 09:23:22 +0000 |
625 | @@ -21,12 +21,14 @@ |
626 | # |
627 | # ##### END LICENSE BLOCK ##### |
628 | |
629 | +import re |
630 | + |
631 | from boots.api.nodes.node import NodeGraph, SyncNode, IteratorNode |
632 | from boots.api.constructors import construct, csv_output_file_node, sink_node |
633 | from boots.lib.ui.components.help import HelpTopic |
634 | from boots.lib.lingos import lingo |
635 | from boots.lib.lingos import sql |
636 | -import re |
637 | +from boots.lib import _, n_ |
638 | |
639 | # Set this to another node constructor to change the default constructor used for output files. |
640 | output_file_node = csv_output_file_node |
641 | @@ -42,7 +44,7 @@ |
642 | string_re = re.compile('^(?P<text>(\'[^\']*\')|("[^"]*"))') |
643 | |
644 | class PipedSQLInterpreter(sql.SQLInterpreter): |
645 | - help = HelpTopic("pipedsql", "Piped SQL Lingo", "Enhanced SQL query language supporting pipes.") |
646 | + help = HelpTopic("pipedsql", _("Piped SQL Lingo"), _("Enhanced SQL query language supporting pipes.")) |
647 | |
648 | def __init__(self, *args, **kwargs): |
649 | super(PipedSQLInterpreter, self).__init__(*args, **kwargs) |
650 | @@ -54,7 +56,7 @@ |
651 | match = clause_re.match(clause_string) |
652 | |
653 | if not match: |
654 | - raise SyntaxError('{0} is not in the correct function call syntax'.format(clause_string)) |
655 | + raise SyntaxError(_('{0} is not in the correct function call syntax').format(clause_string)) |
656 | |
657 | constructor_call = match.group('constructor_call').strip() |
658 | output_file = match.group('output_file') |
659 | @@ -65,7 +67,7 @@ |
660 | match = constructor_call_re.match(constructor_string) |
661 | |
662 | if not match: |
663 | - raise SyntaxError('{0} is not in the correct function call syntax'.format(constructor_string)) |
664 | + raise SyntaxError(_('{0} is not in the correct function call syntax').format(constructor_string)) |
665 | |
666 | name = match.group('name') |
667 | arguments = match.group('arguments') |
668 | @@ -92,7 +94,7 @@ |
669 | constructor_call, output_file = self._parse_clause(clause) |
670 | except SyntaxError as e: |
671 | print(e) |
672 | - print 'error1' |
673 | + print _('error1') |
674 | return [] # Return an empty list to avoid printing None. |
675 | |
676 | try: |
677 | @@ -104,7 +106,7 @@ |
678 | # SQL is only allowed for the first node. |
679 | if sql: |
680 | if not first_node: |
681 | - raise SyntaxError('SQL is only permitted for the first clause') |
682 | + raise SyntaxError(_('SQL is only permitted for the first clause')) |
683 | |
684 | # FIXME: Add support for multiple servers here. Currently only the first server |
685 | # is used. |
686 | |
687 | === modified file 'boots/lib/lingos/python.py' |
688 | --- boots/lib/lingos/python.py 2010-03-05 22:13:28 +0000 |
689 | +++ boots/lib/lingos/python.py 2010-03-07 09:23:22 +0000 |
690 | @@ -27,12 +27,13 @@ |
691 | from boots.api import errors |
692 | from boots.lib.lingos import lingo |
693 | from boots.lib.ui.components.help import HelpTopic |
694 | +from boots.lib import _, n_ |
695 | |
696 | class PythonInterpreter(lingo.Interpreter): |
697 | """Implements a python interpreter that will send commands to the python interpreter that runs |
698 | boots.""" |
699 | |
700 | - help = HelpTopic("python", "Python Lingo", "Integrated Python interpreter using the Boots API.") |
701 | + help = HelpTopic("python", _("Python Lingo"), _("Integrated Python interpreter using the Boots API.")) |
702 | |
703 | def __init__(self, *args, **kwargs): |
704 | super(PythonInterpreter, self).__init__(*args, **kwargs) |
705 | |
706 | === modified file 'boots/lib/lingos/sql.py' |
707 | --- boots/lib/lingos/sql.py 2010-02-27 05:54:13 +0000 |
708 | +++ boots/lib/lingos/sql.py 2010-03-07 09:23:22 +0000 |
709 | @@ -24,9 +24,10 @@ |
710 | from boots.api.nodes.node import NodeGraph, SyncNode, IteratorNode |
711 | from boots.lib.ui.components.help import HelpTopic |
712 | from boots.lib.lingos import lingo |
713 | +from boots.lib import _, n_ |
714 | |
715 | class SQLInterpreter(lingo.Interpreter): |
716 | - help = HelpTopic("sql", "SQL Lingo", "Raw SQL commands sent to a server.") |
717 | + help = HelpTopic("sql", _("SQL Lingo"), _("Raw SQL commands sent to a server.")) |
718 | |
719 | def __init__(self, *args, **kwargs): |
720 | super(SQLInterpreter, self).__init__(*args, **kwargs) |
721 | |
722 | === modified file 'boots/lib/ui/components/help.py' |
723 | --- boots/lib/ui/components/help.py 2010-02-27 05:54:13 +0000 |
724 | +++ boots/lib/ui/components/help.py 2010-03-07 09:23:22 +0000 |
725 | @@ -21,6 +21,8 @@ |
726 | # |
727 | # ##### END LICENSE BLOCK ##### |
728 | |
729 | +from boots.lib import _, n_ |
730 | + |
731 | def issubseq(subseq, seq): |
732 | """Determines if the elements the sequence subseq form a subsequence of the sequence seq.""" |
733 | for start in range(len(seq) - len(subseq) + 1): |
734 | @@ -63,11 +65,11 @@ |
735 | template += "{0.description}" |
736 | |
737 | if self.see_also: |
738 | - template += "\n\nSee also: {0.see_also}" |
739 | + template += "\n\n"+_("See also: {0.see_also}") |
740 | |
741 | output = template.format(self) |
742 | if include_index and self._subtopics: |
743 | - output += "\n--- Subtopics ---\n" + self.format_index() |
744 | + output += "\n--- "+_("Subtopics")+" ---\n" + self.format_index() |
745 | |
746 | return output |
747 | |
748 | @@ -101,7 +103,7 @@ |
749 | assert isinstance(item, str) |
750 | return query |
751 | else: |
752 | - raise TypeError('query object {0} is not a string or tuple of strings'.format(query)) |
753 | + raise TypeError(_('query object {0} is not a string or tuple of strings').format(query)) |
754 | |
755 | def _ensure_key(self, key): |
756 | """Creates a new subtopic that key maps to if none exists.""" |
757 | @@ -198,4 +200,4 @@ |
758 | subtopics = self._subtopics.copy() |
759 | for path in self.root.search(self.query): |
760 | subtopics.update(self.root[path]._subtopics) |
761 | - return subtopics |
762 | \ No newline at end of file |
763 | + return subtopics |
764 | |
765 | === modified file 'boots/lib/ui/components/metacommands.py' |
766 | --- boots/lib/ui/components/metacommands.py 2010-03-07 05:03:00 +0000 |
767 | +++ boots/lib/ui/components/metacommands.py 2010-03-07 09:23:22 +0000 |
768 | @@ -26,6 +26,7 @@ |
769 | import types |
770 | |
771 | from boots.api.errors import BootsError, BootsWarning |
772 | +from boots.lib import _, n_ |
773 | |
774 | class MetaCommandError(BootsError): |
775 | """Errors related to metacommands.""" |
776 | @@ -68,7 +69,7 @@ |
777 | # FIXME: Issue warning through the UI using ui.print |
778 | # FIXME: Determine the offending command(s) (set.intersect?) |
779 | # FIXME: Print offending commands |
780 | - return MetaCommandConflictWarning("Conflicts between metacommands detected.") |
781 | + return MetaCommandConflictWarning(_("Conflicts between metacommands detected.")) |
782 | self.names |= newnames |
783 | |
784 | class MetaCommands(object): |
785 | @@ -105,7 +106,7 @@ |
786 | name, func, args = metacommand |
787 | expected_arg_count = argument_count(func) |
788 | if expected_arg_count is not None and len(args) != expected_arg_count: |
789 | - raise InvalidArgumentError("{0} takes {1} arguments ({2} given)".format( |
790 | + raise InvalidArgumentError(_("{0} takes {1} arguments ({2} given)").format( |
791 | name, expected_arg_count, len(args))) |
792 | else: |
793 | func(*args) |
794 | |
795 | === modified file 'boots/lib/ui/plain.py' |
796 | --- boots/lib/ui/plain.py 2010-03-05 22:13:28 +0000 |
797 | +++ boots/lib/ui/plain.py 2010-03-07 09:23:22 +0000 |
798 | @@ -30,12 +30,13 @@ |
799 | import readline |
800 | import subprocess |
801 | import threading |
802 | - |
803 | + |
804 | from boots.api.api import Rows, ResultInfo |
805 | from boots.api.nodes.node import Status, NodeGraph, SyncNode, filter_none |
806 | from boots.lib.ui.components.help import HelpTopic |
807 | from boots.lib.ui.components.metacommands import MetaCommandError, MetaCommands, parse_metacommand |
808 | from boots.lib.ui.generic import StdinDriver, StdoutPresenter |
809 | +from boots.lib import _, n_ |
810 | |
811 | class PlainUI(StdinDriver, StdoutPresenter): |
812 | """Class that provides a 'plain' UI for boots. Input is taken on stdin, |
813 | @@ -43,11 +44,11 @@ |
814 | results are printed to stdout. These results are printed as tables when |
815 | they are Server packets and as string interpretations otherwise.""" |
816 | |
817 | - help = HelpTopic("plain", "Plain UI", "Plain UI documentation.", """ |
818 | - A simple, minimal user interface for Boots.""") |
819 | + help = HelpTopic("plain", _("Plain UI"), _("Plain UI documentation."), |
820 | + _("A simple, minimal user interface for Boots.")) |
821 | |
822 | - help.add("commands", None, "List of Plain UI commands.") |
823 | - help["commands"].add("\use", "use", "Switch to a different lingo.") |
824 | + help.add("commands", None, _("List of Plain UI commands.")) |
825 | + help["commands"].add("\use", _("use"), _("Switch to a different lingo.")) |
826 | |
827 | def __init__(self, console): |
828 | """Initialize a UI giving it its parent console, primary prompt, |
829 | @@ -133,7 +134,7 @@ |
830 | shell=False, |
831 | stdin=subprocess.PIPE) |
832 | except: |
833 | - sys.stdout.write("Unable to run pager command \"{0}\". Pager disabled.\n" |
834 | + sys.stdout.write(_("Unable to run pager command \"{0}\". Pager disabled.\n") |
835 | .format(self.pager_command)) |
836 | self.pager_command = None |
837 | return False |
838 | @@ -156,7 +157,7 @@ |
839 | def padded(fields, widths): |
840 | """Utility function used to convert rows from tuples to table rows. |
841 | Results are returned as strings.""" |
842 | - return "| {0} |\n".format(" | ".join(map(str.ljust, fields, widths))) |
843 | + return "| {0} |".format(" | ".join(map(str.ljust, fields, widths))) |
844 | |
845 | def show_NULL(value): |
846 | """There is a 'bug' in the dbapi that does not convert NULL objects |
847 | @@ -168,7 +169,7 @@ |
848 | if self.buffer: |
849 | max_widths = map(max, [(len(column[0]), column[2]) for column in info["description"]]) |
850 | dashes = map(lambda x: "-"*(x+2), max_widths) |
851 | - sep_line = "+" + "+".join(dashes) + "+\n" |
852 | + sep_line = "+" + "+".join(dashes) + "+" |
853 | names = (column[0] for column in info["description"]) |
854 | yield sep_line |
855 | yield padded(names, max_widths) |
856 | @@ -182,9 +183,13 @@ |
857 | elapsed = info["end_time"] - info["begin_time"] |
858 | noun = "row" if info["row_count"] == 1 else "rows" |
859 | if info["description"] is not None: |
860 | - info_line = "{count} {noun} in set ({elapsed:.2f} seconds)\n" |
861 | + info_line = n_("{count} row in set ({elapsed:.2f} seconds)", |
862 | + "{count} rows in set ({elapsed:.2f} seconds)", |
863 | + info["row_count"]) |
864 | else: |
865 | - info_line = "{count} {noun} affected ({elapsed:.2f} seconds)\n" |
866 | + info_line = n_("{count} row affected ({elapsed:.2f} seconds)", |
867 | + "{count} rows affected ({elapsed:.2f} seconds)", |
868 | + info["row_count"]) |
869 | |
870 | yield info_line.format(count=info["row_count"], |
871 | noun=noun, |
872 | @@ -196,25 +201,29 @@ |
873 | printed = False |
874 | output = _gen_table(result.value) |
875 | if self.pager_command and self.console.driver.is_interactive: |
876 | - printed = self.print_with_pager("".join(output)) |
877 | + printed = self.print_with_pager("\n".join(output)) |
878 | |
879 | # Fallback if no pager set, or paging fails. |
880 | if not printed: |
881 | for line in output: |
882 | sys.stdout.write(line) |
883 | + sys.stdout.write("\n") |
884 | |
885 | # Reset values for next result set. |
886 | self.buffer = [] |
887 | elif isinstance(result, Status): |
888 | - sys.stdout.write("Status :: ") |
889 | + sys.stdout.write(_("Status")) |
890 | + sys.stdout.write(" :: ") |
891 | sys.stdout.write(str(result)) |
892 | sys.stdout.write("\n") |
893 | elif isinstance(result, Warning): |
894 | - sys.stderr.write("WARNING :: ") |
895 | + sys.stderr.write(_("WARNING")) |
896 | + sys.stderr.write(" :: ") |
897 | sys.stderr.write(str(result)) |
898 | sys.stderr.write("\n") |
899 | elif isinstance(result, Exception): |
900 | - sys.stderr.write("ERROR :: ") |
901 | + sys.stderr.write(_("ERROR")) |
902 | + sys.stderr.write(" :: ") |
903 | sys.stderr.write(str(result)) |
904 | sys.stderr.write("\n") |
905 | elif result is not None: |
906 | @@ -234,4 +243,4 @@ |
907 | if lingo in self.console.lingos: |
908 | self.lingo = lingo |
909 | else: |
910 | - self.present("The specified lingo \"{0}\" does not exist.".format(lingo)) |
911 | + self.present(_("The specified lingo \"{0}\" does not exist.").format(lingo)) |
912 | |
913 | === added directory 'po' |
914 | === added file 'po/README.txt' |
915 | --- po/README.txt 1970-01-01 00:00:00 +0000 |
916 | +++ po/README.txt 2010-03-07 09:23:22 +0000 |
917 | @@ -0,0 +1,16 @@ |
918 | +====== When adding code that outputs a string ====== |
919 | +1) Add (if not present already) to the import section of the .py file: |
920 | + |
921 | +Depending on the package the file is in: |
922 | +from boots.app import _, n_ |
923 | +from boots.api import _, n_ |
924 | +from boots.lib import _, n_ |
925 | + |
926 | +Then, wrap all output strings with _("..."). |
927 | + |
928 | +Example: |
929 | +help = "Execute commands from file and exit") |
930 | +should be wrapped as such: |
931 | +help = _("Execute commands from file and exit")) |
932 | + |
933 | +2) Generate the updated .pot file by running the /boots/po/createpots.sh script. This will overwrite the existing pot.cms file. Any prevously generated .po .mo files can then be updated from this new file. |
934 | \ No newline at end of file |
935 | |
936 | === added file 'po/boots.pot' |
937 | --- po/boots.pot 1970-01-01 00:00:00 +0000 |
938 | +++ po/boots.pot 2010-03-07 09:23:22 +0000 |
939 | @@ -0,0 +1,376 @@ |
940 | +# SOME DESCRIPTIVE TITLE. |
941 | +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER |
942 | +# This file is distributed under the same license as the PACKAGE package. |
943 | +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
944 | +# |
945 | +#, fuzzy |
946 | +msgid "" |
947 | +msgstr "" |
948 | +"Project-Id-Version: boots\n" |
949 | +"Report-Msgid-Bugs-To: http://translations.launchpad.net/boots\n" |
950 | +"POT-Creation-Date: 2010-03-07 01:23-0800\n" |
951 | +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
952 | +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
953 | +"Language-Team: LANGUAGE <LL@li.org>\n" |
954 | +"MIME-Version: 1.0\n" |
955 | +"Content-Type: text/plain; charset=CHARSET\n" |
956 | +"Content-Transfer-Encoding: 8bit\n" |
957 | +"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" |
958 | + |
959 | +#: ../boots/api/api.py:89 |
960 | +msgid "Could not connect to {0}" |
961 | +msgstr "" |
962 | + |
963 | +#: ../boots/api/api.py:101 |
964 | +msgid "Connection closed" |
965 | +msgstr "" |
966 | + |
967 | +#: ../boots/api/api.py:124 |
968 | +msgid "Lost connection to {0}. Reconnecting..." |
969 | +msgstr "" |
970 | + |
971 | +#: ../boots/api/api.py:136 |
972 | +msgid "Reconnected." |
973 | +msgstr "" |
974 | + |
975 | +#: ../boots/api/constructors.py:36 |
976 | +msgid "A constructor with name {0} already exists" |
977 | +msgstr "" |
978 | + |
979 | +#: ../boots/api/constructors.py:47 |
980 | +msgid "There is no constructor with the name {0}." |
981 | +msgstr "" |
982 | + |
983 | +#: ../boots/api/errors.py:53 |
984 | +msgid "Lost connection to {0}" |
985 | +msgstr "" |
986 | + |
987 | +#: ../boots/api/errors.py:58 |
988 | +msgid "(Exception upon reconnect: {0})" |
989 | +msgstr "" |
990 | + |
991 | +#: ../boots/app/client_config.py:93 |
992 | +msgid "Execute command and exit" |
993 | +msgstr "" |
994 | + |
995 | +#: ../boots/app/client_config.py:98 |
996 | +msgid "Use database" |
997 | +msgstr "" |
998 | + |
999 | +#: ../boots/app/client_config.py:103 |
1000 | +msgid "Execute commands from file and exit" |
1001 | +msgstr "" |
1002 | + |
1003 | +#: ../boots/app/client_config.py:108 |
1004 | +msgid "Set the lingo to use" |
1005 | +msgstr "" |
1006 | + |
1007 | +#: ../boots/app/client_config.py:112 |
1008 | +msgid "Do not read user configuration file" |
1009 | +msgstr "" |
1010 | + |
1011 | +#: ../boots/app/client_config.py:117 |
1012 | +msgid "Filename of user configuration file" |
1013 | +msgstr "" |
1014 | + |
1015 | +#: ../boots/app/client_config.py:122 |
1016 | +msgid "Connect to host" |
1017 | +msgstr "" |
1018 | + |
1019 | +#: ../boots/app/client_config.py:127 |
1020 | +msgid "Use port number" |
1021 | +msgstr "" |
1022 | + |
1023 | +#: ../boots/app/client_config.py:132 |
1024 | +msgid "Login with username" |
1025 | +msgstr "" |
1026 | + |
1027 | +#: ../boots/app/client_config.py:137 |
1028 | +msgid "Connect using password. If none is given, query for password" |
1029 | +msgstr "" |
1030 | + |
1031 | +#: ../boots/app/client_config.py:142 |
1032 | +msgid "Pipe query results to the specified pager." |
1033 | +msgstr "" |
1034 | + |
1035 | +#: ../boots/app/client_config.py:147 |
1036 | +msgid "Specify the SQL statement terminating character. Default is ';'." |
1037 | +msgstr "" |
1038 | + |
1039 | +#: ../boots/app/client_config.py:152 |
1040 | +msgid "Specify file to save history to" |
1041 | +msgstr "" |
1042 | + |
1043 | +#: ../boots/app/client_config.py:157 |
1044 | +msgid "Specify max history file length" |
1045 | +msgstr "" |
1046 | + |
1047 | +#: ../boots/app/client_config.py:205 |
1048 | +msgid "rcfile {0} not found" |
1049 | +msgstr "" |
1050 | + |
1051 | +#: ../boots/app/client_config.py:207 |
1052 | +msgid "rcfile {0} contains a syntax error" |
1053 | +msgstr "" |
1054 | + |
1055 | +#: ../boots/app/client_config.py:209 |
1056 | +msgid "rcfile {0} contains an error: {1}" |
1057 | +msgstr "" |
1058 | + |
1059 | +#: ../boots/lib/lingos/lisp/builtins.py:62 |
1060 | +msgid "Expected a cons, nil or a string" |
1061 | +msgstr "" |
1062 | + |
1063 | +#: ../boots/lib/lingos/lisp/builtins.py:71 |
1064 | +msgid "Expected a cons or string" |
1065 | +msgstr "" |
1066 | + |
1067 | +#: ../boots/lib/lingos/lisp/lexer.py:39 |
1068 | +msgid "illegal character {0} found" |
1069 | +msgstr "" |
1070 | + |
1071 | +#: ../boots/lib/lingos/lisp/lisp.py:58 |
1072 | +msgid "unmatched closing \")\"" |
1073 | +msgstr "" |
1074 | + |
1075 | +#: ../boots/lib/lingos/lisp/lisp.py:77 |
1076 | +msgid "{0} is not a stream or a callable" |
1077 | +msgstr "" |
1078 | + |
1079 | +#: ../boots/lib/lingos/lisp/objects.py:101 |
1080 | +msgid "Wrong number of arguments for if special form {0}" |
1081 | +msgstr "" |
1082 | + |
1083 | +#: ../boots/lib/lingos/lisp/objects.py:120 |
1084 | +msgid "" |
1085 | +"The number of symbols must equal the number of values and must be non-zero" |
1086 | +msgstr "" |
1087 | + |
1088 | +#: ../boots/lib/lingos/lisp/objects.py:134 |
1089 | +msgid "Expected a function" |
1090 | +msgstr "" |
1091 | + |
1092 | +#: ../boots/lib/lingos/lisp/objects.py:170 |
1093 | +#: ../boots/lib/lingos/lisp/objects.py:181 |
1094 | +msgid "Expected a symbol" |
1095 | +msgstr "" |
1096 | + |
1097 | +#: ../boots/lib/lingos/lisp/objects.py:175 |
1098 | +msgid "No binding for {0} exists in the current environment" |
1099 | +msgstr "" |
1100 | + |
1101 | +#: ../boots/lib/lingos/lisp/objects.py:220 |
1102 | +msgid "Cannot pop the innermost scope because then no scopes would remain" |
1103 | +msgstr "" |
1104 | + |
1105 | +#: ../boots/lib/lingos/lisp/parser.py:65 |
1106 | +msgid "syntax error" |
1107 | +msgstr "" |
1108 | + |
1109 | +#: ../boots/lib/lingos/bash_external.py:33 |
1110 | +msgid "Bash Lingo" |
1111 | +msgstr "" |
1112 | + |
1113 | +#: ../boots/lib/lingos/bash_external.py:33 |
1114 | +msgid "External bash shell." |
1115 | +msgstr "" |
1116 | + |
1117 | +#: ../boots/lib/lingos/lingo.py:36 |
1118 | +msgid "A lingo with name {0} already exists" |
1119 | +msgstr "" |
1120 | + |
1121 | +#: ../boots/lib/lingos/sql.py:30 |
1122 | +msgid "SQL Lingo" |
1123 | +msgstr "" |
1124 | + |
1125 | +#: ../boots/lib/lingos/sql.py:30 |
1126 | +msgid "Raw SQL commands sent to a server." |
1127 | +msgstr "" |
1128 | + |
1129 | +#: ../boots/lib/lingos/python.py:36 |
1130 | +msgid "Python Lingo" |
1131 | +msgstr "" |
1132 | + |
1133 | +#: ../boots/lib/lingos/python.py:36 |
1134 | +msgid "Integrated Python interpreter using the Boots API." |
1135 | +msgstr "" |
1136 | + |
1137 | +#: ../boots/lib/lingos/piped_sql.py:47 |
1138 | +msgid "Piped SQL Lingo" |
1139 | +msgstr "" |
1140 | + |
1141 | +#: ../boots/lib/lingos/piped_sql.py:47 |
1142 | +msgid "Enhanced SQL query language supporting pipes." |
1143 | +msgstr "" |
1144 | + |
1145 | +#: ../boots/lib/lingos/piped_sql.py:59 ../boots/lib/lingos/piped_sql.py:70 |
1146 | +msgid "{0} is not in the correct function call syntax" |
1147 | +msgstr "" |
1148 | + |
1149 | +#: ../boots/lib/lingos/piped_sql.py:97 |
1150 | +msgid "error1" |
1151 | +msgstr "" |
1152 | + |
1153 | +#: ../boots/lib/lingos/piped_sql.py:109 |
1154 | +msgid "SQL is only permitted for the first clause" |
1155 | +msgstr "" |
1156 | + |
1157 | +#: ../boots/lib/ui/components/help.py:68 |
1158 | +msgid "See also: {0.see_also}" |
1159 | +msgstr "" |
1160 | + |
1161 | +#: ../boots/lib/ui/components/help.py:72 |
1162 | +msgid "Subtopics" |
1163 | +msgstr "" |
1164 | + |
1165 | +#: ../boots/lib/ui/components/help.py:106 |
1166 | +msgid "query object {0} is not a string or tuple of strings" |
1167 | +msgstr "" |
1168 | + |
1169 | +#: ../boots/lib/ui/components/metacommands.py:72 |
1170 | +msgid "Conflicts between metacommands detected." |
1171 | +msgstr "" |
1172 | + |
1173 | +#: ../boots/lib/ui/components/metacommands.py:109 |
1174 | +msgid "{0} takes {1} arguments ({2} given)" |
1175 | +msgstr "" |
1176 | + |
1177 | +#: ../boots/lib/ui/plain.py:47 |
1178 | +msgid "Plain UI" |
1179 | +msgstr "" |
1180 | + |
1181 | +#: ../boots/lib/ui/plain.py:47 |
1182 | +msgid "Plain UI documentation." |
1183 | +msgstr "" |
1184 | + |
1185 | +#: ../boots/lib/ui/plain.py:48 |
1186 | +msgid "A simple, minimal user interface for Boots." |
1187 | +msgstr "" |
1188 | + |
1189 | +#: ../boots/lib/ui/plain.py:50 |
1190 | +msgid "List of Plain UI commands." |
1191 | +msgstr "" |
1192 | + |
1193 | +#: ../boots/lib/ui/plain.py:51 |
1194 | +msgid "use" |
1195 | +msgstr "" |
1196 | + |
1197 | +#: ../boots/lib/ui/plain.py:51 |
1198 | +msgid "Switch to a different lingo." |
1199 | +msgstr "" |
1200 | + |
1201 | +#: ../boots/lib/ui/plain.py:137 |
1202 | +msgid "Unable to run pager command \"{0}\". Pager disabled.\n" |
1203 | +msgstr "" |
1204 | + |
1205 | +#: ../boots/lib/ui/plain.py:186 |
1206 | +msgid "{count} row in set ({elapsed:.2f} seconds)" |
1207 | +msgid_plural "{count} rows in set ({elapsed:.2f} seconds)" |
1208 | +msgstr[0] "" |
1209 | +msgstr[1] "" |
1210 | + |
1211 | +#: ../boots/lib/ui/plain.py:190 |
1212 | +msgid "{count} row affected ({elapsed:.2f} seconds)" |
1213 | +msgid_plural "{count} rows affected ({elapsed:.2f} seconds)" |
1214 | +msgstr[0] "" |
1215 | +msgstr[1] "" |
1216 | + |
1217 | +#: ../boots/lib/ui/plain.py:215 |
1218 | +msgid "Status" |
1219 | +msgstr "" |
1220 | + |
1221 | +#: ../boots/lib/ui/plain.py:220 |
1222 | +msgid "WARNING" |
1223 | +msgstr "" |
1224 | + |
1225 | +#: ../boots/lib/ui/plain.py:225 |
1226 | +msgid "ERROR" |
1227 | +msgstr "" |
1228 | + |
1229 | +#: ../boots/lib/ui/plain.py:246 |
1230 | +msgid "The specified lingo \"{0}\" does not exist." |
1231 | +msgstr "" |
1232 | + |
1233 | +#: ../boots/lib/console.py:69 |
1234 | +msgid "Boots encountered an internal error: {0}" |
1235 | +msgstr "" |
1236 | + |
1237 | +#: ../boots/lib/console.py:119 |
1238 | +msgid "Boots Help" |
1239 | +msgstr "" |
1240 | + |
1241 | +#: ../boots/lib/console.py:119 |
1242 | +msgid "Help" |
1243 | +msgstr "" |
1244 | + |
1245 | +#: ../boots/lib/console.py:120 |
1246 | +msgid "" |
1247 | +"Boots is a flexible, extensible, and multilingual shell for working with " |
1248 | +"databases. To read more about a subtopic, use `help <topic>`." |
1249 | +msgstr "" |
1250 | + |
1251 | +#: ../boots/lib/console.py:123 |
1252 | +msgid "List of Boots commands." |
1253 | +msgstr "" |
1254 | + |
1255 | +#: ../boots/lib/console.py:126 |
1256 | +msgid "quit" |
1257 | +msgstr "" |
1258 | + |
1259 | +#: ../boots/lib/console.py:126 |
1260 | +msgid "Quit boots." |
1261 | +msgstr "" |
1262 | + |
1263 | +#: ../boots/lib/console.py:127 |
1264 | +msgid "help" |
1265 | +msgstr "" |
1266 | + |
1267 | +#: ../boots/lib/console.py:127 |
1268 | +msgid "Show help for a topic." |
1269 | +msgstr "" |
1270 | + |
1271 | +#: ../boots/lib/console.py:128 |
1272 | +msgid "" |
1273 | +"help <topic>\n" |
1274 | +"Show help for \"topic\"." |
1275 | +msgstr "" |
1276 | + |
1277 | +#: ../boots/lib/console.py:131 |
1278 | +msgid "Lingos" |
1279 | +msgstr "" |
1280 | + |
1281 | +#: ../boots/lib/console.py:131 |
1282 | +msgid "Documentation for loaded lingos." |
1283 | +msgstr "" |
1284 | + |
1285 | +#: ../boots/lib/console.py:132 |
1286 | +msgid "A lingo is a command language usable within Boots." |
1287 | +msgstr "" |
1288 | + |
1289 | +#: ../boots/lib/console.py:144 |
1290 | +msgid "Invalid lingo \"{0}\" specified." |
1291 | +msgstr "" |
1292 | + |
1293 | +#: ../boots/lib/console.py:173 |
1294 | +msgid "Could not connect to {0}:{1}" |
1295 | +msgstr "" |
1296 | + |
1297 | +#: ../boots/lib/console.py:192 |
1298 | +msgid "{0.hostname}:{0.port} (server v{0.server_version})" |
1299 | +msgstr "" |
1300 | + |
1301 | +#: ../boots/lib/console.py:227 |
1302 | +msgid "Boots quit." |
1303 | +msgstr "" |
1304 | + |
1305 | +#: ../boots/lib/console.py:245 |
1306 | +msgid "Did you mean: {0}?" |
1307 | +msgstr "" |
1308 | + |
1309 | +#: ../boots/lib/console.py:247 |
1310 | +msgid "No help found for \"{0}\"." |
1311 | +msgstr "" |
1312 | + |
1313 | +#: ../boots/lib/console.py:276 |
1314 | +msgid "Could not open file {0}" |
1315 | +msgstr "" |
1316 | |
1317 | === added file 'po/createpots.sh' |
1318 | --- po/createpots.sh 1970-01-01 00:00:00 +0000 |
1319 | +++ po/createpots.sh 2010-03-07 09:23:22 +0000 |
1320 | @@ -0,0 +1,3 @@ |
1321 | +#!/bin/bash |
1322 | +find ../boots/ -name *.py | xargs xgettext --language=Python --keyword="n_:1,2" --output=boots.pot --package-name="boots" --msgid-bugs-address="http://translations.launchpad.net/boots" |
1323 | + |