Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activity.py20
-rw-r--r--po/SimpleGraph.pot14
-rw-r--r--po/es.po14
3 files changed, 32 insertions, 16 deletions
diff --git a/activity.py b/activity.py
index 13b02a9..5cf8c28 100644
--- a/activity.py
+++ b/activity.py
@@ -388,12 +388,18 @@ class SimpleGraph(activity.Activity):
self._update_chart_data()
def _set_h_label(self, widget):
- self.x_label = widget.get_text()
- self._update_chart_labels()
+ new_text = widget.get_text()
+
+ if new_text != self.h_label.text:
+ self.x_label = new_text
+ self._update_chart_labels()
def _set_v_label(self, widget):
- self.y_label = widget.get_text()
- self._update_chart_labels()
+ new_text = widget.get_text()
+
+ if new_text != self.v_label.text:
+ self.y_label = new_text
+ self._update_chart_labels()
def _set_chart_color(self, widget, pspec):
self.chart_color = rgb_to_html(widget.get_color())
@@ -426,6 +432,12 @@ class SimpleGraph(activity.Activity):
self.metadata['mime_type'] = "activity/x-simplegraph"
if self.current_chart:
+ if self.x_label == "":
+ self.x_label = _("Horizontal label...")
+
+ elif self.y_label == "":
+ self.y_label = _("Vertical label...")
+
data = {}
data['title'] = self.metadata["title"]
data['x_label'] = self.x_label
diff --git a/po/SimpleGraph.pot b/po/SimpleGraph.pot
index a1179f7..8a9abfa 100644
--- a/po/SimpleGraph.pot
+++ b/po/SimpleGraph.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-02-06 12:57-0200\n"
+"POT-Creation-Date: 2012-02-06 13:45-0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -58,10 +58,12 @@ msgid "Line Color"
msgstr ""
#: /home/agustin/Activities/SimpleGraph.activity/activity.py:214
+#: /home/agustin/Activities/SimpleGraph.activity/activity.py:436
msgid "Horizontal label..."
msgstr ""
#: /home/agustin/Activities/SimpleGraph.activity/activity.py:228
+#: /home/agustin/Activities/SimpleGraph.activity/activity.py:439
msgid "Vertical label..."
msgstr ""
@@ -69,22 +71,22 @@ msgstr ""
msgid "Fullscreen"
msgstr ""
-#: /home/agustin/Activities/SimpleGraph.activity/activity.py:487
+#: /home/agustin/Activities/SimpleGraph.activity/activity.py:499
msgid "Label"
msgstr ""
-#: /home/agustin/Activities/SimpleGraph.activity/activity.py:498
+#: /home/agustin/Activities/SimpleGraph.activity/activity.py:510
msgid "Value"
msgstr ""
-#: /home/agustin/Activities/SimpleGraph.activity/activity.py:560
+#: /home/agustin/Activities/SimpleGraph.activity/activity.py:572
msgid "Invalid Value"
msgstr ""
-#: /home/agustin/Activities/SimpleGraph.activity/activity.py:562
+#: /home/agustin/Activities/SimpleGraph.activity/activity.py:574
msgid "The value must be a number (integer or decimal)"
msgstr ""
-#: /home/agustin/Activities/SimpleGraph.activity/activity.py:565
+#: /home/agustin/Activities/SimpleGraph.activity/activity.py:577
msgid "Ok"
msgstr ""
diff --git a/po/es.po b/po/es.po
index f9d6efd..df10386 100644
--- a/po/es.po
+++ b/po/es.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 1\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-02-06 12:57-0200\n"
+"POT-Creation-Date: 2012-02-06 13:45-0200\n"
"PO-Revision-Date: 2012-02-03 23:23-0200\n"
"Last-Translator: Agustin Zubiaga <aguz@sugarlabs.org>\n"
"Language-Team: Spanish\n"
@@ -57,10 +57,12 @@ msgid "Line Color"
msgstr "Color de las lineas"
#: activity.py:214
+#: activity.py:436
msgid "Horizontal label..."
msgstr "Etiqueta horizontal..."
#: activity.py:228
+#: activity.py:439
msgid "Vertical label..."
msgstr "Etiqueta vertical..."
@@ -68,22 +70,22 @@ msgstr "Etiqueta vertical..."
msgid "Fullscreen"
msgstr "Pantalla Completa"
-#: activity.py:487
+#: activity.py:499
msgid "Label"
msgstr "Etiqueta"
-#: activity.py:498
+#: activity.py:510
msgid "Value"
msgstr "Valor"
-#: activity.py:560
+#: activity.py:572
msgid "Invalid Value"
msgstr "Valor invalido"
-#: activity.py:562
+#: activity.py:574
msgid "The value must be a number (integer or decimal)"
msgstr "El valor debe ser un numero (entero o decimal)"
-#: activity.py:565
+#: activity.py:577
msgid "Ok"
msgstr "Ok"