[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Fwd: feature request for KAboutData
From:       Espen Sand <espensa () online ! no>
Date:       2000-07-19 16:39:51
[Download RAW message or body]

Hi

topic: translators in the about dialog

I like this and I would like to add it. The only question is how can we 
handle the situation when the application is used with the default 
language. Can I in the KAboutApplicaton code test the returned 
"translator" strings and not make a tab if the string is equal to 
i18n("TRANSLATOR") ? I think this should work but perhaps I have 
forgot something?


----------  Forwarded Message  ----------
Subject: feature request for KAboutData
Date: Wed, 19 Jul 2000 18:17:55 +0200
From: Matthias Kiefer <matthias.kiefer@gmx.de>



Hi Espen,

I have a feature request for KAboutData and the KAboutDialog:
I would like you to add information about the translator of the
application. I have attached a diff to kaboutdata.h and kaboutdata.cpp
which shows, what I like to have added.

The application developer could then add a line like
setTranslator(i18n("TRANSLATOR"),i18n("TRANSLATOREMAIL"));
to the main function and the translator can then set his name while
translating the gui. The problem is only to not use the data, when
using the default (englisch) language, because then the dummy strings
would be used. Maybe this could be avoided by using the extended
i18n() method, by using a description like 
"add the translators (your) name here" and use an empty string as
fallback.

In the about dialog, I think the translator can be shown either in the
"Contributor"-Tab or in a own tab, which maybe can show some
additional information, like the homepage of the translation team.


I think adding support for translator is necessary, because this might
give some motivation to the translators, when their name are shown in the
about dialog.


Would be nice, if you could add this.

kind regards,
   Matthias
-- 
Matthias Kiefer
Email:	matthias.kiefer@gmx.de


-------------------------------------------------------



-- 
Espen Sand



["unnamed" (text/plain)]

--- kaboutdata.h.orig	Wed Jul 19 12:00:45 2000
+++ kaboutdata.h	Wed Jul 19 12:12:19 2000
@@ -210,6 +210,20 @@
 		    const char *emailAddress=0,
 		    const char *webAddress=0 );
 
+	/**
+	 * Sets the translator of the application gui.
+	 * Typically used with a dummy text, so the translator can
+	 * set his name in the translation file.
+	 *
+	 * Example: 
+	 * setTranslator(i18n("set the translators (your) name","TRANSLATOR"),
+	 *               i18n("set the translators (your) email adress "EMAIL"),
+	 *               i18n("set the homepage of the translation team","HOMEPAGE"));
+	 */
+	void setTranslator(const char *name,
+			           const char *emailAddress=0,
+					   const char *webAddress=0);
+
     /**
      * Defines a licence text. Normally you should set a
      * value in the constructor which provides a set of standard licenses.
@@ -259,6 +273,11 @@
      */
     const QValueList<KAboutPerson> credits() const;
 
+	/**
+	 * @return translator information
+	 */
+	KAboutPerson translator() const;
+
     /**
      * @return the free form text (translated). 
      */
@@ -290,6 +309,7 @@
     const char *mBugEmailAddress;
     QValueList<KAboutPerson> mAuthorList;
     QValueList<KAboutPerson> mCreditList;
+	KAboutPerson mTranslator;
     const char *mLicenseText;
 
     KAboutDataPrivate *d;

["unnamed" (text/plain)]

--- kaboutdata.cpp.orig	Wed Jul 19 12:00:52 2000
+++ kaboutdata.cpp	Wed Jul 19 12:25:18 2000
@@ -95,6 +95,17 @@
   mCreditList.append(KAboutPerson(name,task,emailAddress,webAddress));
 }
 
+void KAboutData::setTranslator( const char *name, const char *emailAddress,
+		    const char *webAddress)
+{
+	// only add the translator, if the user has not the
+	// standard language selected.
+	if(KGlobal::locale()->languageList().first()!="C")
+	{ 
+		mTranslator=KAboutPerson(name,"",emailAddress,webAddress); 
+	}
+}
+
 void
 KAboutData::setLicenseText( const char *licenseText )
 {
@@ -153,6 +164,12 @@
 KAboutData::credits() const
 {
    return mCreditList;
+}
+
+KAboutPerson
+KAboutData::translator() const
+{
+	return mTranslator;
 }
 
 QString


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic