def month(self, number, format=None, default=None): """ Returns a Message with the month name, that can be translated by the TAL engine. Format is either None or 'a' (long or abbreviation). """ if default is None: default = monthname_english(number, format=format) value = 'a' == format and monthname_msgid_abbr(number) or monthname_msgid(number) return PLMF(value, default=default)
def month(self, number, format=None, default=None): """ Returns a Message with the month name, that can be translated by the TAL engine. Format is either None or 'a' (long or abbreviation). """ if default is None: default = monthname_english(number, format=format) value = 'a' == format and monthname_msgid_abbr( number) or monthname_msgid(number) return PLMF(value, default=default)
def month_msgid(self, number, format=None): """ Returns the msgid which can be passed to the translation service for l10n of month names. Format is either '' or 'a' (long or abbreviation). >>> ttool = TranslationServiceTool() >>> ttool.month_msgid(1) 'month_jan' >>> ttool.month_msgid(12) 'month_dec' >>> ttool.month_msgid(6, format='a') 'month_jun_abbr' """ return 'a' == format and monthname_msgid_abbr(number) or monthname_msgid(number)
def month_msgid(self, number, format=None): """ Returns the msgid which can be passed to the translation service for l10n of month names. Format is either '' or 'a' (long or abbreviation). >>> ttool = TranslationServiceTool() >>> ttool.month_msgid(1) 'month_jan' >>> ttool.month_msgid(12) 'month_dec' >>> ttool.month_msgid(6, format='a') 'month_jun_abbr' """ return 'a' == format and monthname_msgid_abbr( number) or monthname_msgid(number)