[Development] [Interest] Direct-lookup translation, even for English (was Re: get english translation)

Thiago Macieira thiago.macieira at intel.com
Thu Sep 4 18:26:38 CEST 2014


On Thursday 04 September 2014 13:03:12 Saether Jan-Arve wrote:
> Somebody already suggested to embed it as a resource, isn't that good
> enough?

As long as we also load it by default. We cannot depend on users loading the 
translation file from the resource system.

> > Imagine an application that is only run in English (no L10n) and for
> > which the source code has proper, English messages. Will it occur to
> > the developers that they have to provide the en_US translation file
> > from Qt?
> > 
> > No, it won't. We need to get rid of that file.
> 
> If we get rid of it we have to provide an alternative way of providing those
> plural forms, preferably in some language-agnostic API (since Qt does not
> constrain you to write your source text in English). Unfortunately there
> are up to 6 different "plural forms" in some languages, and the rules to
> know which to pick differs greatly depending on the language.

I'm saying we need a convenience for us, so we don't have to ship a 
translation file, and we write Qt source in English. This convenience could 
also be used by most software, since they are also written in English.

If you write your language source in another language with different plural 
rules, you'll need to use the existing overload and provide a translation from 
your language back to your language again.

> ..or alternatively we need to be clarify our documentation to explicitly
> mention that this plural-form-translation feature requires a translation to
> be installed, even in English.

Which is what I don't want. This basically requires everyone to always load 
the Qt translation, even if their apps aren't l10n'ed.

> One only need to provide a translation file for the case you are describing
> if the application developer uses the plural translation feature. If that
> feature is not used, the translation file is not needed in your case. I
> assume if an application developer uses that feature, he should also have
> read its documentation. And if his plural translations doesn't work I would
> expect him to read that part again. And if he still doesn't manage to
> deploy the translation file after that, the user will still see "Found 1
> item(s)" instead of "Found 1 item", which is not the end of the world,
> really.

Agreed.

But I'm assuming from your previous message that we use the feature in Qt's 
own sources. Therefore, every single application uses the feature.

> > PS: I can't find it. Shouldn't we have at least one in qttranslations?
> 
> Prior to this discussion I would say yes. Right now it depends on if we need
> to get rid of it ;-D Since I'm not yet convinced, I would still vote for
> adding it.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Development mailing list