[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: libgettextpo: Getting markers (c-format, etc)
From: |
Bruno Haible |
Subject: |
Re: libgettextpo: Getting markers (c-format, etc) |
Date: |
Sun, 21 Oct 2007 17:03:07 +0200 |
User-agent: |
KMail/1.5.4 |
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);
/* 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);
Thank you for the suggestion.
> 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.
Bruno