Beispiel #1
0
 def __getattr__(self, attr):
     try:
         return StringHandler.__getattr__(self, attr)
     except KeyError:
         return getattr(plurals, attr)
Beispiel #2
0
    like 'moderators' or 'contributors' so this class first checks its
    own dictionary of string translations before falling back on the
    plurals list."""
    def __getattr__(self, attr):
        try:
            return StringHandler.__getattr__(self, attr)
        except KeyError:
            return getattr(plurals, attr)


# selected menu styles, primarily used on the main nav bar
menu_selected = StringHandler(
    hot=_("what's hot"),
    new=_("what's new"),
    top=_("top scoring"),
    controversial=_("most controversial"),
    saved=_("saved"),
    recommended=_("recommended"),
    promote=_('promote'),
)

# translation strings for every menu on the site
menu = MenuHandler(
    hot=_('hot'),
    new=_('new'),
    old=_('old'),
    ups=_('ups'),
    downs=_('downs'),
    top=_('top'),
    more=_('more'),
    relevance=_('relevance'),
Beispiel #3
0
 def __getattr__(self, attr):
     try:
         return StringHandler.__getattr__(self, attr)
     except KeyError:
         return getattr(plurals, attr)
Beispiel #4
0
    like 'moderators' or 'contributors' so this class first checks its
    own dictionary of string translations before falling back on the
    plurals list."""
    def __getattr__(self, attr):
        try:
            return StringHandler.__getattr__(self, attr)
        except KeyError:
            return getattr(plurals, attr)


# selected menu styles, primarily used on the main nav bar
menu_selected = StringHandler(
    hot=_("Popular"),
    new=_("What's new"),
    top=_("Top scoring"),
    controversial=_("Most controversial"),
    saved=_("Saved"),
    recommended=_("Recommended"),
    promote=_('Promote'),
)

# translation strings for every menu on the site
menu = MenuHandler(
    hot=_('Popular'),
    new=_('New'),
    old=_('Old'),
    ups=_('Ups'),
    downs=_('Downs'),
    top=_('Top'),
    more=_('More'),
    relevance=_('Relevance'),