[Kbabel] kdesdk/kbabel/commonui
Marco Wegner
dubbleu@web.de
Tue, 28 Jan 2003 17:23:48 +0100 (CET)
CVS commit by mwegner:
CCMAIL: kbabel@kde.org
- Rough translation now can fill in valid values for ROLES_OF_TRANSLATORS
and CREDITS_FOR_TRANSLATORS
M +26 -0 roughtransdlg.cpp 1.9
--- kdesdk/kbabel/commonui/roughtransdlg.cpp #1.8:1.9
@@ -294,4 +294,30 @@ void RoughTransDlg::translate()
}
}
+ else if (msg.find("ROLES_OF_TRANSLATORS") == 0)
+ {
+ QString temp = "<othercredit role=\\\"translator\\\">\n<firstname></firstname>"
+ "<surname></surname>\n<affiliation><address><email>" +
+ catalog->identitySettings( ).authorEmail+"</email></address>\n"
+ "</affiliation><contrib></contrib></othercredit>";
+ if (origTrans.isEmpty( ))
+ translation = temp;
+ else if (origTrans.find(catalog->identitySettings( ).authorEmail) < 0)
+ translation = origTrans + "\n" + temp;
+ }
+ else if (msg.find("CREDIT_FOR_TRANSLATORS") == 0)
+ {
+ QString authorName;
+ if (!catalog->identitySettings( ).authorLocalizedName.isEmpty( ))
+ authorName = catalog->identitySettings( ).authorLocalizedName;
+ else if (!catalog->identitySettings( ).authorName.isEmpty( ))
+ authorName = catalog->identitySettings( ).authorName;
+ QString temp = "<para>" + authorName + "\n" + "<email>" +
+ catalog->identitySettings( ).authorEmail + "</email></para>";
+ if (origTrans.isEmpty( ))
+ translation = temp;
+ else if (origTrans.find(authorName) < 0 &&
+ origTrans.find(catalog->identitySettings( ).authorEmail) < 0)
+ translation = origTrans + "\n" + temp;
+ }
}
}