X Tutup
Skip to content

Commit 7152bab

Browse files
author
Sebastian Ramacher
committed
Translate some more strings.
1 parent 8132696 commit 7152bab

File tree

4 files changed

+245
-85
lines changed

4 files changed

+245
-85
lines changed

bpython/repl.py

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@
4949

5050
from bpython import importcompletion, inspection
5151
from bpython.formatter import Parenthesis
52+
from bpython.translations import _
53+
5254

5355
# Needed for special handling of __abstractmethods__
5456
# abc only exists since 2.6, so check both that it exists and that it's
@@ -771,16 +773,16 @@ def pastebin(self, s=None):
771773
s = self.getstdout()
772774

773775
if (self.config.pastebin_confirm and
774-
not self.interact.confirm("Pastebin buffer? (y/N) ")):
775-
self.interact.notify("Pastebin aborted")
776+
not self.interact.confirm(_("Pastebin buffer? (y/N) "))):
777+
self.interact.notify(_("Pastebin aborted"))
776778
return
777779
return self.do_pastebin(s)
778780

779781
def do_pastebin(self, s):
780782
"""Actually perform the upload."""
781783
if s == self.prev_pastebin_content:
782-
self.interact.notify('Duplicate pastebin. Previous URL: ' +
783-
self.prev_pastebin_url)
784+
self.interact.notify(_('Duplicate pastebin. Previous URL: %s') %
785+
(self.prev_pastebin_url, ))
784786
return self.prev_pastebin_url
785787

786788
if self.config.pastebin_helper:
@@ -793,16 +795,16 @@ def do_pastebin_xmlrpc(self, s):
793795
try:
794796
pasteservice = ServerProxy(self.config.pastebin_url)
795797
except IOError, e:
796-
self.interact.notify("Pastebin error for URL '%s': %s" %
798+
self.interact.notify(_("Pastebin error for URL '%s': %s") %
797799
(self.config.pastebin_url, str(e)))
798800
return
799801

800-
self.interact.notify('Posting data to pastebin...')
802+
self.interact.notify(_('Posting data to pastebin...'))
801803
try:
802804
paste_id = pasteservice.pastes.newPaste('pycon', s, '', '', '',
803805
self.config.pastebin_private)
804806
except (SocketError, XMLRPCError), e:
805-
self.interact.notify('Upload failed: %s' % (str(e), ) )
807+
self.interact.notify(_('Upload failed: %s') % (str(e), ) )
806808
return
807809

808810
self.prev_pastebin_content = s
@@ -811,12 +813,12 @@ def do_pastebin_xmlrpc(self, s):
811813
paste_id = urlquote(paste_id)
812814
paste_url = paste_url_template.safe_substitute(paste_id=paste_id)
813815
self.prev_pastebin_url = paste_url
814-
self.interact.notify('Pastebin URL: %s' % (paste_url, ), 10)
816+
self.interact.notify(_('Pastebin URL: %s') % (paste_url, ), 10)
815817
return paste_url
816818

817819
def do_pastebin_helper(self, s):
818820
"""Call out to helper program for pastebin upload."""
819-
self.interact.notify('Posting data to pastebin...')
821+
self.interact.notify(_('Posting data to pastebin...'))
820822

821823
try:
822824
helper = subprocess.Popen('',
@@ -828,34 +830,34 @@ def do_pastebin_helper(self, s):
828830
paste_url = output.split()[0]
829831
except OSError, e:
830832
if e.errno == errno.ENOENT:
831-
self.interact.notify('Upload failed: '
832-
'Helper program not found.')
833+
self.interact.notify(_('Upload failed: '
834+
'Helper program not found.'))
833835
else:
834-
self.interact.notify('Upload failed: '
835-
'Helper program could not be run.')
836+
self.interact.notify(_('Upload failed: '
837+
'Helper program could not be run.'))
836838
return
837839

838840
if helper.returncode != 0:
839-
self.interact.notify('Upload failed: '
840-
'Helper program returned non-zero exit '
841-
'status %s.' % (helper.returncode, ))
841+
self.interact.notify(_('Upload failed: '
842+
'Helper program returned non-zero exit '
843+
'status %s.' % (helper.returncode, )))
842844
return
843845

844846
if not paste_url:
845-
self.interact.notify('Upload failed: '
846-
'No output from helper program.')
847+
self.interact.notify(_('Upload failed: '
848+
'No output from helper program.'))
847849
return
848850
else:
849851
parsed_url = urlparse(paste_url)
850852
if (not parsed_url.scheme
851853
or any(unicodedata.category(c) == 'Cc' for c in paste_url)):
852-
self.interact.notify("Upload failed: "
853-
"Failed to recognize the helper "
854-
"program's output as an URL.")
854+
self.interact.notify(_("Upload failed: "
855+
"Failed to recognize the helper "
856+
"program's output as an URL."))
855857
return
856858

857859
self.prev_pastebin_content = s
858-
self.interact.notify('Pastebin URL: %s' % (paste_url, ), 10)
860+
self.interact.notify(_('Pastebin URL: %s') % (paste_url, ), 10)
859861
return paste_url
860862

861863
def push(self, s, insert_into_history=True):
Lines changed: 76 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,135 @@
1-
# Translations template for bpython.
1+
# Spanish (Spain) translations for bpython.
22
# Copyright (C) 2010 ORGANIZATION
33
# This file is distributed under the same license as the bpython project.
44
# Claudia Medde, 2010.
55
#
6-
#,
76
msgid ""
87
msgstr ""
98
"Project-Id-Version: bpython 0.9.7\n"
109
"Report-Msgid-Bugs-To: http://bitbucket.org/bobf/bpython/issues\n"
11-
"POT-Creation-Date: 2010-07-21 14:46+0200\n"
10+
"POT-Creation-Date: 2012-05-29 01:26+0200\n"
1211
"PO-Revision-Date: 2010-07-21 14:46+0200\n"
1312
"Last-Translator: Claudia Medde\n"
1413
"Language-Team: bpython developers\n"
14+
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
1515
"MIME-Version: 1.0\n"
1616
"Content-Type: text/plain; charset=utf-8\n"
1717
"Content-Transfer-Encoding: 8bit\n"
18-
"Generated-By: Babel 0.9.5\n"
18+
"Generated-By: Babel 0.9.6\n"
1919

20-
21-
#: bpython/cli.py:250 bpython/urwid.py:400
20+
#: bpython/cli.py:303 bpython/urwid.py:529
2221
msgid "y"
2322
msgstr "s"
2423

25-
#: bpython/cli.py:250 bpython/urwid.py:400
24+
#: bpython/cli.py:303 bpython/urwid.py:529
2625
msgid "yes"
2726
msgstr "si"
2827

29-
#: bpython/cli.py:877 bpython/gtk_.py:482
28+
#: bpython/cli.py:969 bpython/gtk_.py:484
3029
msgid "Cannot show source."
3130
msgstr "Imposible mostrar el código fuente"
3231

33-
#: bpython/cli.py:1527 bpython/urwid.py:415
32+
#: bpython/cli.py:1641 bpython/urwid.py:591
33+
#, python-format
3434
msgid " <%s> Rewind <%s> Save <%s> Pastebin <%s> Pager <%s> Show Source "
35-
msgstr " <%s> Rewind <%s> Salva <%s> Pastebin <%s> Pager <%s> Mostra el código fuente"
35+
msgstr ""
36+
" <%s> Rewind <%s> Salva <%s> Pastebin <%s> Pager <%s> Mostra el "
37+
"código fuente"
3638

37-
#: bpython/gtk_.py:90 bpython/gtk_.py:113
39+
#: bpython/gtk_.py:92 bpython/gtk_.py:117
3840
msgid "An error occurred."
3941
msgstr ""
4042

41-
#: bpython/gtk_.py:97
43+
#: bpython/gtk_.py:99
4244
msgid "Exception details"
4345
msgstr ""
4446

45-
#: bpython/gtk_.py:149
47+
#: bpython/gtk_.py:151
4648
msgid "Statusbar"
4749
msgstr "Statusbar"
4850

49-
#: bpython/gtk_.py:226
51+
#: bpython/gtk_.py:228
5052
msgid "tooltip"
5153
msgstr "tooltip"
5254

53-
#: bpython/gtk_.py:295
55+
#: bpython/gtk_.py:297
5456
msgid "File to save to"
5557
msgstr ""
5658

57-
#: bpython/gtk_.py:306
59+
#: bpython/gtk_.py:308
5860
msgid "Python files"
5961
msgstr "Files Python"
6062

61-
#: bpython/gtk_.py:311
63+
#: bpython/gtk_.py:313
6264
msgid "All files"
6365
msgstr "Todos los files"
6466

65-
#: bpython/gtk_.py:773
67+
#: bpython/gtk_.py:771
6668
msgid "gtk-specific options"
6769
msgstr ""
6870

69-
#: bpython/gtk_.py:774
71+
#: bpython/gtk_.py:772
7072
msgid "Options specific to bpython's Gtk+ front end"
7173
msgstr ""
7274

73-
#: bpython/gtk_.py:776
75+
#: bpython/gtk_.py:774
7476
msgid "Embed bpython"
7577
msgstr "Embed bpython"
7678

77-
#: bpython/gtk_.py:832
79+
#: bpython/gtk_.py:830
7880
msgid "Pastebin selection"
7981
msgstr "Pastebin la selección"
8082

83+
#: bpython/repl.py:776
84+
msgid "Pastebin buffer? (y/N) "
85+
msgstr ""
86+
87+
#: bpython/repl.py:777
88+
msgid "Pastebin aborted"
89+
msgstr ""
90+
91+
#: bpython/repl.py:784
92+
#, python-format
93+
msgid "Duplicate pastebin. Previous URL: %s"
94+
msgstr ""
95+
96+
#: bpython/repl.py:798
97+
#, python-format
98+
msgid "Pastebin error for URL '%s': %s"
99+
msgstr ""
100+
101+
#: bpython/repl.py:802 bpython/repl.py:821
102+
msgid "Posting data to pastebin..."
103+
msgstr ""
104+
105+
#: bpython/repl.py:807
106+
#, python-format
107+
msgid "Upload failed: %s"
108+
msgstr ""
109+
110+
#: bpython/repl.py:816 bpython/repl.py:860
111+
#, python-format
112+
msgid "Pastebin URL: %s"
113+
msgstr ""
114+
115+
#: bpython/repl.py:833
116+
msgid "Upload failed: Helper program not found."
117+
msgstr ""
118+
119+
#: bpython/repl.py:836
120+
msgid "Upload failed: Helper program could not be run."
121+
msgstr ""
122+
123+
#: bpython/repl.py:843
124+
#, python-format
125+
msgid "Upload failed: Helper program returned non-zero exit status %s."
126+
msgstr ""
127+
128+
#: bpython/repl.py:847
129+
msgid "Upload failed: No output from helper program."
130+
msgstr ""
131+
132+
#: bpython/repl.py:854
133+
msgid "Upload failed: Failed to recognize the helper program's output as an URL."
134+
msgstr ""
135+

0 commit comments

Comments
 (0)
X Tutup