本文整理汇总了Python中pyasm.common.Common.pluralize方法的典型用法代码示例。如果您正苦于以下问题:Python Common.pluralize方法的具体用法?Python Common.pluralize怎么用?Python Common.pluralize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyasm.common.Common
的用法示例。
在下文中一共展示了Common.pluralize方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_display
# 需要导入模块: from pyasm.common import Common [as 别名]
# 或者: from pyasm.common.Common import pluralize [as 别名]
def get_display(self):
from tactic.ui.panel import ViewPanelWdg, CustomLayoutWdg
top = self.top
detail_view = self.kwargs.get("detail_view")
if detail_view:
self.kwargs['view'] = detail_view
layout = CustomLayoutWdg(**self.kwargs)
else:
top.add_style("margin: 20px")
day = self.kwargs.get("day")
title = self.kwargs.get("st_title")
title = Common.pluralize(title)
title_wdg = DivWdg()
top.add(title_wdg)
title_wdg.add("<div style='font-size: 25px'>%s for date: %s</div>" % (title, day))
title_wdg.add("List of %s on this day." % title)
title_wdg.add("<hr/>")
self.kwargs['show_shelf'] = False
layout = ViewPanelWdg(**self.kwargs)
top.add(layout)
return top
示例2: get_display
# 需要导入模块: from pyasm.common import Common [as 别名]
# 或者: from pyasm.common.Common import pluralize [as 别名]
def get_display(my):
from tactic.ui.panel import ViewPanelWdg
top = my.top
top.add_style("margin: 20px")
day = my.kwargs.get("day")
title = my.kwargs.get("st_title")
title = Common.pluralize(title)
title_wdg = DivWdg()
top.add(title_wdg)
title_wdg.add("<div style='font-size: 25px'>%s for date: %s</div>" % (title, day))
title_wdg.add("List of %s that are due on this day." % title)
title_wdg.add("<hr/>")
my.kwargs['show_shelf'] = False
layout = ViewPanelWdg(**my.kwargs)
top.add(layout)
return top