mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
kdecore: reduce branches in KLocale::translateRaw()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
5143a5895e
commit
3e1e82534a
1 changed files with 2 additions and 6 deletions
|
@ -597,16 +597,12 @@ void KLocale::translateRaw(const char *ctxt, const char *singular, const char *p
|
|||
if (lang) {
|
||||
*lang = KLocale::defaultLanguage();
|
||||
}
|
||||
if (!plural) {
|
||||
*trans = QString::fromUtf8(singular);
|
||||
} else {
|
||||
if (n == 1) {
|
||||
if (!plural || n == 1) {
|
||||
*trans = QString::fromUtf8(singular);
|
||||
} else {
|
||||
*trans = QString::fromUtf8(plural);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QString KLocale::translateQt(const char *context, const char *sourceText) const
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue