From bec11643ab178426c3a49886ad7251171fe42c77 Mon Sep 17 00:00:00 2001 From: Daniel Francis Date: Fri, 05 Oct 2012 23:12:16 +0000 Subject: Change quotations --- diff --git a/illustrate.py b/illustrate.py index 0a33540..4782d30 100644 --- a/illustrate.py +++ b/illustrate.py @@ -43,22 +43,22 @@ from dialogs import ExampleDialog def rgb2html(color): - """Returns a html string from a Gdk color""" - red = "%x" % int(color.red / 65535.0 * 255) + '''Returns a html string from a Gdk color''' + red = '%x' % int(color.red / 65535.0 * 255) if len(red) == 1: - red = "0%s" % red + red = '0%s' % red - green = "%x" % int(color.green / 65535.0 * 255) + green = '%x' % int(color.green / 65535.0 * 255) if len(green) == 1: - green = "0%s" % green + green = '0%s' % green - blue = "%x" % int(color.blue / 65535.0 * 255) + blue = '%x' % int(color.blue / 65535.0 * 255) if len(blue) == 1: - blue = "0%s" % blue + blue = '0%s' % blue - new_color = "#%s%s%s" % (red, green, blue) + new_color = '#%s%s%s' % (red, green, blue) return new_color @@ -73,10 +73,10 @@ class IllustrateActivity(activity.Activity): # The Activity Button: activity_button = ActivityToolbarButton(self) - open_from_journal_button = ToolButton("open-from-journal") - open_from_journal_button.connect("clicked", self.load_objectchooser) + open_from_journal_button = ToolButton('open-from-journal') + open_from_journal_button.connect('clicked', self.load_objectchooser) open_from_journal_button.props.tooltip = \ - _("Load text from Sugar Journal") + _('Load text from Sugar Journal') open_from_journal_button.show() # Insert a button in the activity button toolbar @@ -90,14 +90,14 @@ class IllustrateActivity(activity.Activity): separator.set_draw(True) toolbarbox.toolbar.insert(separator, -1) - dialog_btn = ToolButton("dialog-icon") - dialog_btn.set_tooltip(_("Dialog example")) - dialog_btn.connect("clicked", self._show_example_dialog) + dialog_btn = ToolButton('dialog-icon') + dialog_btn.set_tooltip(_('Dialog example')) + dialog_btn.connect('clicked', self._show_example_dialog) toolbarbox.toolbar.insert(dialog_btn, -1) - alert_btn = ToolButton("alert-icon") - alert_btn.set_tooltip(_("Alert example")) - alert_btn.connect("clicked", self._show_alert_btn_pallete) + alert_btn = ToolButton('alert-icon') + alert_btn.set_tooltip(_('Alert example')) + alert_btn.connect('clicked', self._show_alert_btn_pallete) toolbarbox.toolbar.insert(alert_btn, -1) separator = gtk.SeparatorToolItem() @@ -107,18 +107,19 @@ class IllustrateActivity(activity.Activity): # RadioToolButton self._circle_btn = RadioToolButton() - self._circle_btn.props.icon_name = "sugar-integration" - self._circle_btn.connect("clicked", self._set_background) + self._circle_btn.props.icon_name = 'sugar-integration' + self._circle_btn.props.accelerator = 'I' + self._circle_btn.connect('clicked', self._set_background) self._spiral_btn = RadioToolButton() - self._spiral_btn.props.icon_name = "spiral" + self._spiral_btn.props.icon_name = 'spiral' self._spiral_btn.props.group = self._circle_btn - self._spiral_btn.connect("clicked", self._set_background) + self._spiral_btn.connect('clicked', self._set_background) self._box_btn = RadioToolButton() - self._box_btn.props.icon_name = "box" + self._box_btn.props.icon_name = 'box' self._box_btn.props.group = self._circle_btn - self._box_btn.connect("clicked", self._set_background) + self._box_btn.connect('clicked', self._set_background) toolbarbox.toolbar.insert(self._circle_btn, -1) toolbarbox.toolbar.insert(self._spiral_btn, -1) @@ -135,7 +136,7 @@ class IllustrateActivity(activity.Activity): # Add a gtk.Label in a toolbar using gtk.ToolItem toolitem = gtk.ToolItem() - toolitem.add(gtk.Label(_("Color Button example: "))) + toolitem.add(gtk.Label(_('Color Button example: '))) options_toolbar.insert(toolitem, -1) # Get the profile color @@ -145,14 +146,14 @@ class IllustrateActivity(activity.Activity): self.fill_color_btn = ColorToolButton() self.fill_color_btn.set_color(gtk.gdk.Color( profile_color.get_fill_color())) - self.fill_color_btn.set_title(_("Fill Color")) + self.fill_color_btn.set_title(_('Fill Color')) self.fill_color_btn.connect('notify::color', self._set_fill_color) options_toolbar.insert(self.fill_color_btn, -1) self.stroke_color_btn = ColorToolButton() self.stroke_color_btn.set_color(gtk.gdk.Color( profile_color.get_stroke_color())) - self.stroke_color_btn.set_title(_("Stroke Color")) + self.stroke_color_btn.set_title(_('Stroke Color')) self.stroke_color_btn.connect('notify::color', self._set_stroke_color) options_toolbar.insert(self.stroke_color_btn, -1) @@ -176,7 +177,7 @@ class IllustrateActivity(activity.Activity): # For a white background: canvas = gtk.EventBox() - canvas.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse("white")) + canvas.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse('white')) self.set_canvas(canvas) @@ -195,11 +196,11 @@ class IllustrateActivity(activity.Activity): palette = button.get_palette() hbox = gtk.HBox() - simple = ToolButton("alert-icon") - simple.connect("clicked", self._show_example_alert, False) + simple = ToolButton('alert-icon') + simple.connect('clicked', self._show_example_alert, False) - notify = ToolButton("notify-alert-icon") - notify.connect("clicked", self._show_example_alert, True) + notify = ToolButton('notify-alert-icon') + notify.connect('clicked', self._show_example_alert, True) hbox.pack_start(simple, False, True, 0) hbox.pack_end(notify, False, True, 0) @@ -214,7 +215,7 @@ class IllustrateActivity(activity.Activity): result = chooser.run() if result == gtk.RESPONSE_ACCEPT: jobject = chooser.get_selected_object() - _file = open(str(jobject.get_file_path()), "r") + _file = open(str(jobject.get_file_path()), 'r') text = _file.read() _file.close() alert = NotifyAlert(10) @@ -279,28 +280,28 @@ class IllustrateActivity(activity.Activity): def _helpbutton(self, toolbarbox): helpbutton = HelpButton() - helpbutton.add_section(_("A section")) - helpbutton.add_paragraph(_("A paragraph with an icon"), "help-icon") + helpbutton.add_section(_('A section')) + helpbutton.add_paragraph(_('A paragraph with an icon'), 'help-icon') helpbutton.add_paragraph( - _("You can add as many paragraphs you'd like.")) + _('You can add as many paragraphs you\'d like.')) helpbutton.add_section( - _("Why should your activity be well integrated?")) - helpbutton.add_paragraph(_("There are many Sugar activities;\ + _('Why should your activity be well integrated?')) + helpbutton.add_paragraph(_('There are many Sugar activities;\ if they all work in a similar way,\ - the children and teachers who use Sugar will be more comfortable.")) - helpbutton.add_section(_("About")) + the children and teachers who use Sugar will be more comfortable.')) + helpbutton.add_section(_('About')) helpbutton.add_paragraph( - _("This Sugar Activity integrates examples.")) - helpbutton.add_paragraph(_("Thanks for using our activity!")) + _('This Sugar Activity integrates examples.')) + helpbutton.add_paragraph(_('Thanks for using our activity!')) toolbarbox.toolbar.insert(helpbutton, -1) def write_file(self, file_path): - jfile = open(file_path, "w") + jfile = open(file_path, 'w') - icon_props = {"fill": self._icon.props.fill_color, - "stroke": self._icon.props.stroke_color, - "icon-name": self._icon.props.icon_name} + icon_props = {'fill': self._icon.props.fill_color, + 'stroke': self._icon.props.stroke_color, + 'icon-name': self._icon.props.icon_name} try: json.dump(icon_props, jfile) @@ -308,15 +309,15 @@ class IllustrateActivity(activity.Activity): jfile.close() def read_file(self, file_path): - jfile = open(file_path, "r") + jfile = open(file_path, 'r') try: icon_props = json.load(jfile) finally: jfile.close() - self.fill_color_btn.set_color(gtk.gdk.Color(icon_props["fill"])) - self.stroke_color_btn.set_color(gtk.gdk.Color(icon_props["stroke"])) + self.fill_color_btn.set_color(gtk.gdk.Color(icon_props['fill'])) + self.stroke_color_btn.set_color(gtk.gdk.Color(icon_props['stroke'])) for i in [self._circle_btn, self._spiral_btn, self._box_btn]: - if i.props.icon_name == icon_props["icon-name"]: + if i.props.icon_name == icon_props['icon-name']: i.set_active(1) diff --git a/po/IllustrateSugarIntegration.pot b/po/IllustrateSugarIntegration.pot index 9c62ad0..a3b5974 100644 --- a/po/IllustrateSugarIntegration.pot +++ b/po/IllustrateSugarIntegration.pot @@ -1,116 +1,116 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# Illustrate Sugar Integration Activity. +# Copyright (C) 2012 CeibalJAM # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" +"Project-Id-Version: Illustrate Sugar Integration 1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-05-10 18:01-0300\n" +"POT-Creation-Date: 2012-06-23 15:43-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: activity/activity.info:2 msgid "Illustrate Sugar Integration" msgstr "" -#: /home/daniel/illustrate-sugar-integration/dialogs.py:92 -msgid "Done" -msgstr "" - -#: /home/daniel/illustrate-sugar-integration/dialogs.py:118 -msgid "Sugar Dialog Example" -msgstr "" - -#: /home/daniel/illustrate-sugar-integration/dialogs.py:125 -msgid "Here you can add all the widgets you want" -msgstr "" - -#: /home/daniel/illustrate-sugar-integration/helpbutton.py:36 -msgid "Help" -msgstr "" - -#: /home/daniel/illustrate-sugar-integration/illustrate.py:78 +#: illustrate.py:79 msgid "Load text from Sugar Journal" msgstr "" -#: /home/daniel/illustrate-sugar-integration/illustrate.py:93 +#: illustrate.py:94 msgid "Dialog example" msgstr "" -#: /home/daniel/illustrate-sugar-integration/illustrate.py:98 +#: illustrate.py:99 msgid "Alert example" msgstr "" -#: /home/daniel/illustrate-sugar-integration/illustrate.py:108 +#: illustrate.py:138 msgid "Color Button example: " msgstr "" -#: /home/daniel/illustrate-sugar-integration/illustrate.py:118 +#: illustrate.py:148 msgid "Fill Color" msgstr "" -#: /home/daniel/illustrate-sugar-integration/illustrate.py:125 +#: illustrate.py:155 msgid "Stroke Color" msgstr "" -#: /home/daniel/illustrate-sugar-integration/illustrate.py:188 +#: illustrate.py:221 msgid "Text loaded" msgstr "" -#: /home/daniel/illustrate-sugar-integration/illustrate.py:201 +#: illustrate.py:234 msgid "Notify Alert" msgstr "" -#: /home/daniel/illustrate-sugar-integration/illustrate.py:206 +#: illustrate.py:239 msgid "Ok" msgstr "" -#: /home/daniel/illustrate-sugar-integration/illustrate.py:208 +#: illustrate.py:241 msgid "Simple Alert" msgstr "" -#: /home/daniel/illustrate-sugar-integration/illustrate.py:210 +#: illustrate.py:243 msgid "Message" msgstr "" -#: /home/daniel/illustrate-sugar-integration/illustrate.py:245 +#: illustrate.py:282 msgid "A section" msgstr "" -#: /home/daniel/illustrate-sugar-integration/illustrate.py:246 +#: illustrate.py:283 msgid "A paragraph with an icon" msgstr "" -#: /home/daniel/illustrate-sugar-integration/illustrate.py:248 +#: illustrate.py:285 msgid "You can add as many paragraphs you'd like." msgstr "" -#: /home/daniel/illustrate-sugar-integration/illustrate.py:250 +#: illustrate.py:287 msgid "Why should your activity be well integrated?" msgstr "" -#: /home/daniel/illustrate-sugar-integration/illustrate.py:251 +#: illustrate.py:288 msgid "" "There are many Sugar activities; if they all work in a similar way, the " "children and teachers who use Sugar will be more comfortable." msgstr "" -#: /home/daniel/illustrate-sugar-integration/illustrate.py:254 +#: illustrate.py:291 msgid "About" msgstr "" -#: /home/daniel/illustrate-sugar-integration/illustrate.py:256 +#: illustrate.py:293 msgid "This Sugar Activity integrates examples." msgstr "" -#: /home/daniel/illustrate-sugar-integration/illustrate.py:257 +#: illustrate.py:294 msgid "Thanks for using our activity!" msgstr "" + +#: dialogs.py:92 +msgid "Done" +msgstr "" + +#: dialogs.py:118 +msgid "Sugar Dialog Example" +msgstr "" + +#: dialogs.py:125 +msgid "Here you can add all the widgets you want" +msgstr "" + +#: helpbutton.py:36 +msgid "Help" +msgstr "" diff --git a/po/es.po b/po/es.po deleted file mode 100644 index 9877285..0000000 --- a/po/es.po +++ /dev/null @@ -1,118 +0,0 @@ -# Sugar Activity Example Translation. -# Copyright (C) 2012 S. Daniel Francis, Agustín Zubiaga -# This file is distributed under the same license as the IllustrateSugarIntegration activity. -# S. Daniel Francis , Agustín Zubiaga , 2012. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: IllustrateSugarIntegration 1\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-05-10 18:01-0300\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: S. Daniel Francis \n" -"Language-Team: LANGUAGE \n" -"Language: Spanish\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: activity/activity.info:2 -msgid "Illustrate Sugar Integration" -msgstr "Ejemplificar integración con Sugar" - -#: /home/daniel/illustrate-sugar-integration/dialogs.py:92 -msgid "Done" -msgstr "Hecho" - -#: /home/daniel/illustrate-sugar-integration/dialogs.py:118 -msgid "Sugar Dialog Example" -msgstr "Ejemplo de dialogo de Sugar" - -#: /home/daniel/illustrate-sugar-integration/dialogs.py:125 -msgid "Here you can add all the widgets you want" -msgstr "Aquí puede añadir todos los widgets que desee" - -#: /home/daniel/illustrate-sugar-integration/helpbutton.py:36 -msgid "Help" -msgstr "Ayuda" - -#: /home/daniel/illustrate-sugar-integration/illustrate.py:78 -msgid "Load text from Sugar Journal" -msgstr "Cargar texto desde el Diario" - -#: /home/daniel/illustrate-sugar-integration/illustrate.py:93 -msgid "Dialog example" -msgstr "Ejemplo de diálogo" - -#: /home/daniel/illustrate-sugar-integration/illustrate.py:98 -msgid "Alert example" -msgstr "Ejemplo de alerta" - -#: /home/daniel/illustrate-sugar-integration/illustrate.py:108 -msgid "Color Button example: " -msgstr "Ejemplo de botón de color: " - -#: /home/daniel/illustrate-sugar-integration/illustrate.py:118 -msgid "Fill Color" -msgstr "Color de Relleno" - -#: /home/daniel/illustrate-sugar-integration/illustrate.py:125 -msgid "Stroke Color" -msgstr "Color de Linea" - -#: /home/daniel/illustrate-sugar-integration/illustrate.py:188 -msgid "Text loaded" -msgstr "Texto cargado" - -#: /home/daniel/illustrate-sugar-integration/illustrate.py:201 -msgid "Notify Alert" -msgstr "Alerta de Notificación" - -#: /home/daniel/illustrate-sugar-integration/illustrate.py:206 -msgid "Ok" -msgstr "Hecho" - -#: /home/daniel/illustrate-sugar-integration/illustrate.py:208 -msgid "Simple Alert" -msgstr "Alerta simple" - -#: /home/daniel/illustrate-sugar-integration/illustrate.py:210 -msgid "Message" -msgstr "Mensaje" - -#: /home/daniel/illustrate-sugar-integration/illustrate.py:245 -msgid "A section" -msgstr "Sección A" - -#: /home/daniel/illustrate-sugar-integration/illustrate.py:246 -msgid "A paragraph with an icon" -msgstr "Un párrafo con un ícono" - -#: /home/daniel/illustrate-sugar-integration/illustrate.py:248 -msgid "You can add as many paragraphs you'd like." -msgstr "Puede añadir tantos párrafos como guste." - -#: /home/daniel/illustrate-sugar-integration/illustrate.py:250 -msgid "Why should your activity be well integrated?" -msgstr "¿Por qué su actividad debe estar bien integrada?" - -#: /home/daniel/illustrate-sugar-integration/illustrate.py:251 -msgid "" -"There are many Sugar activities; if they all work in a similar way, the " -"children and teachers who use Sugar will be more comfortable." -msgstr "" -"Hay muchísimas actividades para Sugar, si todas ellas funcionan de forma " -"similar, los niños y docentes que usen sugar se sentirán más cómodos." - -#: /home/daniel/illustrate-sugar-integration/illustrate.py:254 -msgid "About" -msgstr "Acerca" - -#: /home/daniel/illustrate-sugar-integration/illustrate.py:256 -msgid "This Sugar Activity integrates examples." -msgstr "Esta es una actividad con ejemplos de integración con Sugar" - -#: /home/daniel/illustrate-sugar-integration/illustrate.py:257 -msgid "Thanks for using our activity!" -msgstr "Gracias por usar nuestra actividad!" -- cgit v0.9.1