mirror of
https://github.com/znc/znc.git
synced 2026-08-09 10:23:14 +02:00
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:
@@ -47,27 +47,27 @@ void CClient::UserCommand(CString& sLine) {
|
||||
HelpUser(sLine.Token(1));
|
||||
} else if (sCommand.Equals("LISTNICKS")) {
|
||||
if (!m_pNetwork) {
|
||||
PutStatus(
|
||||
t("You must be connected with a network to use this command"));
|
||||
PutStatus(t_s(
|
||||
"You must be connected with a network to use this command"));
|
||||
return;
|
||||
}
|
||||
|
||||
CString sChan = sLine.Token(1);
|
||||
|
||||
if (sChan.empty()) {
|
||||
PutStatus(t("Usage: ListNicks <#chan>"));
|
||||
PutStatus(t_s("Usage: ListNicks <#chan>"));
|
||||
return;
|
||||
}
|
||||
|
||||
CChan* pChan = m_pNetwork->FindChan(sChan);
|
||||
|
||||
if (!pChan) {
|
||||
PutStatus(f("You are not on [{1}]")(sChan));
|
||||
PutStatus(t_f("You are not on [{1}]")(sChan));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!pChan->IsOn()) {
|
||||
PutStatus(f("You are not on [{1}] (trying)")(sChan));
|
||||
PutStatus(t_f("You are not on [{1}] (trying)")(sChan));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ void CClient::UserCommand(CString& sLine) {
|
||||
const CString& sPerms = (pIRCSock) ? pIRCSock->GetPerms() : "";
|
||||
|
||||
if (msNicks.empty()) {
|
||||
PutStatus(f("No nicks on [{1}]")(sChan));
|
||||
PutStatus(t_f("No nicks on [{1}]")(sChan));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+10
-10
@@ -1995,28 +1995,28 @@ CString CModCommand::GetDescription() const {
|
||||
return m_bTranslating ? m_dDesc.Resolve() : m_sDesc;
|
||||
}
|
||||
|
||||
CString CModule::t(const CString& sEnglish, const CString& sContext) const {
|
||||
CString CModule::t_s(const CString& sEnglish, const CString& sContext) const {
|
||||
return CTranslation::Get().Singular("znc-" + GetModName(), sContext,
|
||||
sEnglish);
|
||||
}
|
||||
|
||||
CInlineFormatMessage CModule::f(const CString& sEnglish,
|
||||
const CString& sContext) const {
|
||||
return CInlineFormatMessage(t(sEnglish, sContext));
|
||||
CInlineFormatMessage CModule::t_f(const CString& sEnglish,
|
||||
const CString& sContext) const {
|
||||
return CInlineFormatMessage(t_s(sEnglish, sContext));
|
||||
}
|
||||
|
||||
CInlineFormatMessage CModule::p(const CString& sEnglish,
|
||||
const CString& sEnglishes, int iNum,
|
||||
const CString& sContext) const {
|
||||
CInlineFormatMessage CModule::t_p(const CString& sEnglish,
|
||||
const CString& sEnglishes, int iNum,
|
||||
const CString& sContext) const {
|
||||
return CInlineFormatMessage(CTranslation::Get().Plural(
|
||||
"znc-" + GetModName(), sContext, sEnglish, sEnglishes, iNum));
|
||||
}
|
||||
|
||||
CDelayedTranslation CModule::d(const CString& sEnglish,
|
||||
const CString& sContext) const {
|
||||
CDelayedTranslation CModule::t_d(const CString& sEnglish,
|
||||
const CString& sContext) const {
|
||||
return CDelayedTranslation("znc-" + GetModName(), sContext, sEnglish);
|
||||
}
|
||||
|
||||
CString CModInfo::t(const CString& sEnglish, const CString& sContext) const {
|
||||
CString CModInfo::t_s(const CString& sEnglish, const CString& sContext) const {
|
||||
return CTranslation::Get().Singular("znc-" + GetName(), sContext, sEnglish);
|
||||
}
|
||||
|
||||
+12
-12
@@ -612,22 +612,22 @@ void CIRCSocket::IcuExtFromUCallback(UConverterFromUnicodeArgs* fromArgs,
|
||||
#endif
|
||||
|
||||
|
||||
CString CSocket::t(const CString& sEnglish, const CString& sContext) const {
|
||||
return GetModule()->t(sEnglish, sContext);
|
||||
CString CSocket::t_s(const CString& sEnglish, const CString& sContext) const {
|
||||
return GetModule()->t_s(sEnglish, sContext);
|
||||
}
|
||||
|
||||
CInlineFormatMessage CSocket::f(const CString& sEnglish,
|
||||
const CString& sContext) const {
|
||||
return GetModule()->f(sEnglish, sContext);
|
||||
CInlineFormatMessage CSocket::t_f(const CString& sEnglish,
|
||||
const CString& sContext) const {
|
||||
return GetModule()->t_f(sEnglish, sContext);
|
||||
}
|
||||
|
||||
CInlineFormatMessage CSocket::p(const CString& sEnglish,
|
||||
const CString& sEnglishes, int iNum,
|
||||
const CString& sContext) const {
|
||||
return GetModule()->p(sEnglish, sEnglishes, iNum, sContext);
|
||||
CInlineFormatMessage CSocket::t_p(const CString& sEnglish,
|
||||
const CString& sEnglishes, int iNum,
|
||||
const CString& sContext) const {
|
||||
return GetModule()->t_p(sEnglish, sEnglishes, iNum, sContext);
|
||||
}
|
||||
|
||||
CDelayedTranslation CSocket::d(const CString& sEnglish,
|
||||
const CString& sContext) const {
|
||||
return GetModule()->d(sEnglish, sContext);
|
||||
CDelayedTranslation CSocket::t_d(const CString& sEnglish,
|
||||
const CString& sContext) const {
|
||||
return GetModule()->t_d(sEnglish, sContext);
|
||||
}
|
||||
|
||||
+11
-11
@@ -87,26 +87,26 @@ void CTranslation::DelReference(const CString& sDomain) {
|
||||
}
|
||||
}
|
||||
|
||||
CString CCoreTranslationMixin::t(const CString& sEnglish,
|
||||
const CString& sContext) {
|
||||
CString CCoreTranslationMixin::t_s(const CString& sEnglish,
|
||||
const CString& sContext) {
|
||||
return CTranslation::Get().Singular("znc", sContext, sEnglish);
|
||||
}
|
||||
|
||||
CInlineFormatMessage CCoreTranslationMixin::f(const CString& sEnglish,
|
||||
const CString& sContext) {
|
||||
return CInlineFormatMessage(t(sEnglish, sContext));
|
||||
CInlineFormatMessage CCoreTranslationMixin::t_f(const CString& sEnglish,
|
||||
const CString& sContext) {
|
||||
return CInlineFormatMessage(t_s(sEnglish, sContext));
|
||||
}
|
||||
|
||||
CInlineFormatMessage CCoreTranslationMixin::p(const CString& sEnglish,
|
||||
const CString& sEnglishes,
|
||||
int iNum,
|
||||
const CString& sContext) {
|
||||
CInlineFormatMessage CCoreTranslationMixin::t_p(const CString& sEnglish,
|
||||
const CString& sEnglishes,
|
||||
int iNum,
|
||||
const CString& sContext) {
|
||||
return CInlineFormatMessage(CTranslation::Get().Plural(
|
||||
"znc", sContext, sEnglish, sEnglishes, iNum));
|
||||
}
|
||||
|
||||
CDelayedTranslation CCoreTranslationMixin::d(const CString& sEnglish,
|
||||
const CString& sContext) {
|
||||
CDelayedTranslation CCoreTranslationMixin::t_d(const CString& sEnglish,
|
||||
const CString& sContext) {
|
||||
return CDelayedTranslation("znc", sContext, sEnglish);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user