diff options
Diffstat (limited to 'com/gmail/bernabe/laurent/sugar_olpc/learning_writing/gui/MenuActions.py')
-rw-r--r--[-rwxr-xr-x] | com/gmail/bernabe/laurent/sugar_olpc/learning_writing/gui/MenuActions.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/com/gmail/bernabe/laurent/sugar_olpc/learning_writing/gui/MenuActions.py b/com/gmail/bernabe/laurent/sugar_olpc/learning_writing/gui/MenuActions.py index b9b0dc8..095024d 100755..100644 --- a/com/gmail/bernabe/laurent/sugar_olpc/learning_writing/gui/MenuActions.py +++ b/com/gmail/bernabe/laurent/sugar_olpc/learning_writing/gui/MenuActions.py @@ -3,6 +3,7 @@ Created on 12 mai 2011 @author: laurent_bernabe ''' +from gettext import gettext as _ from com.gmail.bernabe.laurent.sugar_olpc.learning_writing.gui.InputDialog import \ InputDialog @@ -30,14 +31,14 @@ class MenuActions(object): manageDrawingWrite() Wraps code for menu Drawing->Write ''' - dialog = InputDialog("Line thickness value ?\n(I advice you 5)") + dialog = InputDialog(_("Line thickness value ?\n(I advice you 5)")) user_value = dialog.run() if user_value != None : try: line_thickness = int(user_value) assert line_thickness > 0 except (ValueError, AssertionError) : - message = "As you did not give an correct integer value,\n5 will be taken" + message = _("As you did not give an correct integer value,\n5 will be taken") message_dialog = gtk.MessageDialog(None, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, @@ -53,14 +54,14 @@ class MenuActions(object): manageDrawingRead() Wraps code for menu Drawing->Read ''' - dialog = InputDialog("Steps drawing delays (milliseconds) ?\n(I advice you 10)") + dialog = InputDialog(_("Steps drawing delays (milliseconds) ?\n(I advice you 10)")) user_value = dialog.run() if user_value != None : try: delay_milliseconds = int(user_value) assert delay_milliseconds > 0 except (ValueError, AssertionError) : - message = "As you did not give an correct integer value,\n10 will be taken" + message = _("As you did not give an correct integer value,\n10 will be taken") message_dialog = gtk.MessageDialog(None, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, |