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

List:       kde-devel
Subject:    Re: i18n questions
From:       Andras Mantia <amantia () virtualartisans ! com>
Date:       2003-01-28 13:45:53
[Download RAW message or body]

On 2003. January 28., Tuesday 15:30, Nicolas Goutte wrote:
[...]
> > {
> >         font-weight: Grassetto marcato;
> > }
> >
> > Is there a way to tell that I don't want to translate those listbox
> > elements (or revert the translation when I retrieve the currentText from
> > the listbox), or the only solution is to add one by one the elements from
> > code, without using i18n(...)?
>
> What I do not understand is why you want the strings untranslated despite
> being user visible. 
Because their are "fixed" strings, and in the resulted document they should 
appear untranslated (just as the keywords in programming languages).

> It seems to be against KDE translation policy. It would
> be to the I18N team to decide if they want to keep the CSS names or if they
> want to translate them. (Remember: many people in the world cannot read
> latin letters.)
>
> The proper solution would to check the return result. For exasmple if the
> variable result has what the user has selected:
>
> QString CSSProperty;
> if (result==i18n("bolder"))
> 	CSSProperty="bolder";
> else if (result==i18n("bold"))
> 	CSSProperty="bold";
> // and so on
>
> It might look as being boring code, but it would be i18n friendly.

Ok, this may be more user friendly, then just providing the untranslated 
strings in the dialog box. Altough I agree that there are people who cannot 
even read latin letters, do you think that those people are able to write a 
HTML/PHP or whatever document? ;-) 

Thanks for the hint.

>
> > 2. I would like to read some strings from external files. What is the
> > recommended way to get those strings translated?
> >   a)  use I18N_NOOP to tell that those strings should be translated and
> > use i18n(QString_variable) in code (bad if the external files are from
> > 3rd party) b) Read the translated strings from the external files (like
> > in case of .desktop files). In this case how should it done? Read the
> > correct string from the file by checking the current language of KDE and
> > use the read string in code without i18n?
>
> Defining the string would not go with I18N_NOOP, as the strings are not in
> the C++ source file but somewhere else.

Right, it would not go for 3rd party extra files, and it would be a mess.

> I think they are a few ways to do it correctly but currently I am not
> remembering the examples.
>
> However using i18n for using the translated version is fine, for example:
>
> kdDebug() << "Text:" << QString_variable << " Translation" <<
> i18n(QString_variable.utf8()) << endl;
>
> (QString_variable being a QString)

I don't understand you. I know that it is find to use translated strings 
inside i18n, but if the string is already translated, I believe the i18n is 
not needed. What I would like to know if is there a standard method to deal 
in such cases? I should grep the kde sources to see how it is done in case of 
.desktop file, but I don't have a clue where to start (ok, kdelibs or 
kdecore...)

Andras
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

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