Review Request 127048: Restrict _nl_msg_cat_cntr use to GNU gettext implentations.

Kåre Särs kare.sars at iki.fi
Fri Feb 12 08:27:57 UTC 2016



> On Feb. 12, 2016, 12:02 a.m., Aleix Pol Gonzalez wrote:
> > src/kcatalog.cpp, line 179
> > <https://git.reviewboard.kde.org/r/127048/diff/1/?file=444043#file444043line179>
> >
> >     maybe it should be `#ifdef libintl-lite` no?
> 
> Andreas Cord-Landwehr wrote:
>     Also regarding Kare's comment, I will change this to add a CMake option and a corresponding #ifdef that en-/disables use of GNU specific gettext and hence allows compilation with libintl-lite.
>     However, IMO an automatic switch between the different libintl variants would be nice, but currently I do not see if I can check for the exported "_nl_msg_cat_cntr" via CMake. If anyone has an idea I would very welcome it, since that would get us rid of an extra option.

The libintl-lite version of libintl.h contains "#define LIBINTL_LITE_API" and the gnu version has "#define __USE_GNU_GETTEXT 1" so it should be possible use one of these defines. I think the gnu one would be better as it is that version that needs the magic :)

Can you also move the two "extern ... _nl_msg_cat_cntr" expressions to one place while you are at it?


- Kåre


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127048/#review92280
-----------------------------------------------------------


On Feb. 11, 2016, 7:11 p.m., Andreas Cord-Landwehr wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127048/
> -----------------------------------------------------------
> 
> (Updated Feb. 11, 2016, 7:11 p.m.)
> 
> 
> Review request for KDE Frameworks, Aleix Pol Gonzalez and Chusslove Illich.
> 
> 
> Repository: ki18n
> 
> 
> Description
> -------
> 
> On Android, we do not have libintl but only libintl-lite, which does
> not provide _nl_msg_cat_cntr. Actually, _nl_msg_cat_cntr is a GNU
> gettext specific tool to prevent wrong localization after runtime language
> changes. Thus, it is tied to the specific GNU gettext implementation.
> 
> 
> Diffs
> -----
> 
>   src/kcatalog.cpp 095a6beec721729537a89214a1fbdb661fbfb548 
> 
> Diff: https://git.reviewboard.kde.org/r/127048/diff/
> 
> 
> Testing
> -------
> 
> Tested compilation on Android and Linux.
> 
> 
> Thanks,
> 
> Andreas Cord-Landwehr
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20160212/85828358/attachment.html>


More information about the Kde-frameworks-devel mailing list