bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libgettextpo: Getting markers (c-format, etc)


From: Dwayne Bailey
Subject: Re: libgettextpo: Getting markers (c-format, etc)
Date: Mon, 22 Oct 2007 17:06:30 +0200

On Sun, 2007-10-21 at 17:03 +0200, Bruno Haible wrote:
> Hi,
> 
> Dwayne Bailey wrote:
> > You can determine from a file if a marker is set but only if you know
> > what markers are valid which you then iterate through.  Its tedious to
> > have to keep a list that might change over time and then try each one.
> > 
> > It would be nice to have a function that returns a list of valid markers
> > known by Gettext.
> 
> Indeed. I'm adding these two functions to libgettextpo:
> 
> /* Return a NULL terminated array of the supported format types.  */
> extern const char * const * po_format_list (void);

Perfect :)

> /* Return the pretty name associated with a format type.
>    For example, for "csharp-format", return "C#".
>    Return NULL if the argument is not a supported format type.  */
> extern const char * po_format_pretty_name (const char *format_type);

Nice, this will allow us to present prettier messages to users in some
of our tools.

> Thank you for the suggestion.

Pleasure.

> 
> > But perhaps better to simply have a function that returns a list of all
> > markers set on that unit.
> 
> I feel that the current API is simpler and just as easy to use.

I don't think its any harder so am happy with what you propose.

-- 
Dwayne Bailey
Translate.org.za

+27-12-460-1095 (w)
+27-83-443-7114 (cell)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]