diff options
author | Walter Bender <walter.bender@gmail.com> | 2011-03-05 23:14:49 (GMT) |
---|---|---|
committer | Walter Bender <walter.bender@gmail.com> | 2011-03-05 23:14:49 (GMT) |
commit | 4b1f02ef030771ec38432605ff7b0f3694182923 (patch) | |
tree | 1011597d218ec6a6540d0b438d5e652c95fe6d66 /TurtleArt/tapalette.py | |
parent | fbd858c9cce8837dcc940a43ca28ad46402a38d5 (diff) |
moved HELP_STRINGS to tapalette
Diffstat (limited to 'TurtleArt/tapalette.py')
-rw-r--r-- | TurtleArt/tapalette.py | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/TurtleArt/tapalette.py b/TurtleArt/tapalette.py index ada0040..8d98a2f 100644 --- a/TurtleArt/tapalette.py +++ b/TurtleArt/tapalette.py @@ -69,16 +69,23 @@ block_styles = {'basic-style-head': [], 'portfolio-style-2x1': [], 'portfolio-style-1x2': []} -from taconstants import HELP_STRINGS, EXPANDABLE_STYLE +from taconstants import EXPANDABLE_STYLE from tautils import debug_output +from gettext import gettext as _ + +help_strings = { + 'next': _('displays next palette'), + 'orientation': _("changes the orientation of the palette of blocks") + } + class Palette(): """ a class for defining new palettes """ def __init__(self, name, colors=["#00FF00", "#00A000"], position=None): self._name = name - self._special_name = name + self._special_name = _(name) self._colors = colors self._help = None @@ -107,9 +114,9 @@ class Palette(): # Special name entry is needed for help hover mechanism special_names[self._name] = self._special_name if self._help is not None: - HELP_STRINGS[self._name] = self._help + help_strings[self._name] = self._help else: - HELP_STRINGS[self._name] = '' + help_strings[self._name] = '' def set_help(self, help): self._help = help @@ -196,9 +203,9 @@ class Block(): debug_output('Ignoring position (%s)' % (str(position))) if self._help is not None: - HELP_STRINGS[self._name] = self._help + help_strings[self._name] = self._help else: - HELP_STRINGS[self._name] = '' + help_strings[self._name] = '' if self._value_block: value_blocks.append(self._name) |