[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Add i18n utilities to common library
From: |
Rui Batista |
Subject: |
[PATCH] Add i18n utilities to common library |
Date: |
Tue, 05 Oct 2010 19:26:45 +0100 |
Hi,
Ter, 2010-10-05 ?s 19:57 +0200, Andrei Kholodnyi escreveu:
> Hi Rui,
>
> nice to see patches coming from you again, here are my comments
>
> > +#ifndef I18N_H
> > +#define I18N_H
> > +#include <glib/gi18n.h>
>
> not clear why do you need glib header here.
> you have only void init_i18n (void) declaration.
>
Like I stated on the commmit message, this include is for convenience
only. This glib header includes the gettext headers wich define the
gettext function (aliased to _) and all the needed includes.
> > +void init_i18n(void);
>
> it is better to have it returning status instead of void.
> there are three functions called inside, all of them returning something.
>
I never saw checking the return status of these functions but you are
right on that.
> > +void init_i18n(void)
> > +{
> > + setlocale(LC_ALL, "");
> > + bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
> > + textdomain(GETTEXT_PACKAGE);
> > +}
>
> shouldn't it be also
> #include <libintl.h>
>
> for bindtextdomain and textdomain?
>
The glib header I referenced above includes it.
Regards,
Rui Batista
> Thanks,
> Andrei.
>
> _______________________________________________
> Speechd mailing list
> Speechd at lists.freebsoft.org
> http://lists.freebsoft.org/mailman/listinfo/speechd
Rui Batista
E-mail/googletalk: ruiandrebatista (at) gmail (dot) com
MSN/WLM: ruiandrebatista (at) hotmail (dot) com (don't send mail to this
one)
Skype: ruiandrebatista
twitter: http://twitter.com/ragb
weblog: http://unreliabledevice.net
- [PATCH] Add i18n utilities to common library, Rui Batista, 2010/10/05
- [PATCH] Add i18n utilities to common library, William Hubbs, 2010/10/05
- [PATCH] Add i18n utilities to common library, Andrei Kholodnyi, 2010/10/05
- [PATCH] Add i18n utilities to common library,
Rui Batista <=
- [PATCH] Add i18n utilities to common library, Rui Batista, 2010/10/05
- [PATCH] Add i18n utilities to common library, Andrei Kholodnyi, 2010/10/05
- [PATCH] Add i18n utilities to common library, William Hubbs, 2010/10/05
- [PATCH] Add i18n utilities to common library, Rui Batista, 2010/10/05
- [PATCH] Add i18n utilities to common library, William Hubbs, 2010/10/05
- [PATCH] Add i18n utilities to common library, William Hubbs, 2010/10/05
- [PATCH] Add i18n utilities to common library, Andrei Kholodnyi, 2010/10/06