Ki18n mostly ready

Albert Astals Cid aacid at kde.org
Mon Aug 5 20:35:08 UTC 2013


El Dilluns, 5 d'agost de 2013, a les 22:14:07, Chusslove Illich va escriure:
> > [: Albert Astals Cid :]
> > How would that
> > 
> >     set(TRANSLATION_DOMAIN "foobar")
> > 
> > help you knowing if you want a i18n() or a tr() based system?
> 
> It would automatically use i18n() if TRANSLATION_DOMAIN is defined :)
> Because it would have no purpose with tr()-based code.

to make it more obvious maybe it should be KI18N_TRANSLATION_DOMAIN ?

> 
> >> [: Chusslove Illich :]
> >> (Of the usual non-code files, only .rc files in principle (?) cannot be
> >> handled in this way; would need .rc.cmake treatment, or else manually.)
> > 
> > [: Albert Astals Cid :]
> > I got lost here.
> 
> Code files can get TRANSLATION_DOMAIN everywhere through CMake-configured
> header (.h.cmake). 

What includes that header?

> .ui and .kcfg files are converted to code at build time,
> so TRANSLATION_DOMAIN can be passed along through command line options of
> the the tools that interpret them. That leaves .rc files, which are
> interpreted at runtime. They have to carry information about the translation
> domain within them, in attribute to top tag. So this attribute has either
> to be set manually, or there should be .rc.cmake files which are configured
> at build time with CMake. I think.

Anything that needs manual intervention will break because most people don't 
care about i18n and almost noone tries their code with a non english locale, 
so let's not go for anything manual if possible.

Cheers,
  Albert


More information about the Kde-frameworks-devel mailing list