Rename translation methods to be not one letter.

It fixes several warnings, when the name was shadowed by a local "p".
This commit is contained in:
Alexey Sokolov
2016-09-12 00:01:45 +01:00
parent 187f617bbc
commit cc653efb6b
12 changed files with 198 additions and 194 deletions

View File

@@ -170,18 +170,18 @@ class Module:
return self.GetModName()
@classmethod
def t(cls, english, context=''):
def t_s(cls, english, context=''):
domain = 'znc-' + cls.__name__
return CTranslation.Get().Singular(domain, context, english)
@classmethod
def f(cls, english, context=''):
fmt = cls.t(english, context)
def t_f(cls, english, context=''):
fmt = cls.t_s(english, context)
# Returning bound method
return fmt.format
@classmethod
def p(cls, english, englishes, num, context=''):
def t_p(cls, english, englishes, num, context=''):
domain = 'znc-' + cls.__name__
fmt = CTranslation.Get().Plural(domain, context, english, englishes,
num)