Re: Introducing separate strings for quick bar items
- From: Egmont Koblinger <egmont uhulinux hu>
- To: Roland Illig <roland illig gmx de>
- Cc: MC Devel <mc-devel gnome org>
- Subject: Re: Introducing separate strings for quick bar items
- Date: Wed, 13 Jul 2005 10:07:49 +0200
On Wed, Jul 13, 2005 at 04:17:19AM +0200, Roland Illig wrote:
> This would result in a function like this:
>
> const char *translate_ui (const char *s)
With a simpler name, of course :-)))
I'm just wondering whether __() is fair, or should be treated as it belonged
to glibc private namespace.
Or we can just have a function that doesn't call gettext(), only strips,
then maybe you could write stripwhatever(_("...")). This way I guess the
source becomes more readable, and no extra command line option is needed for
msg* to recognise one more function name.
> {
> const char *result = _(s);
> if (result == s) {
> result = strchr(s, '|');
> return (result != NULL) ? result + 1 : s;
> }
> return result;
> }
So you only chop the first *| if the string wasn't translated. I think it's
better to always chop it since then translators can use Ctrl+Space in KBabel
or any other hotkeys to quickly tell that the translation happens to be the
same as the original text (which is quite often in en_GB, but also happens
for other languages). But if the real string doesn't contain a '|', which is
very likely, then omitting the prefix in the translation would also work.
> It is not needed. N_ is just an indicator for gettext(1) for considering
> which strings should be translated. Finally, each string declared using
> N_ must be passed through gettext() anyway.
Yep, thanks for refreshing my memories, now I remember how it works. :-))
--
Egmont
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]