Boost logo

Boost :

Subject: Re: [boost] [locale] Custom Gettext paths.
From: Jookia (166291_at_[hidden])
Date: 2012-08-21 13:55:29


On 21/08/12 18:52, Artyom Beilis wrote:
> Hello,
>
> First of all good job!
>
> This this is something that was requested for some time.

Awesome and thanks.

If this was requested previously, would there be a trac issue?

> However I have two points:
> 1. I'd rather use a single format and not multiple, such that I would use
>
> std::string generator::path_format() const
> void generator::path_format(std::string const &);
> void generator::set_default_path_format();
>
> Because it makes a complex search that is even today complex even more complex.

This is something that I'm concerned about. If there's one path format,
an application may have to do something 'interesting' if it has two
paths with different formats. I'm all ears on how to fix this scenario:

I have an application that is standalone that can run in /home, that
uses the compact path. But it's also able to be installed system wide,
which means it'd be best for it to use the /usr/share/locale thing. How
would

Of course, a single path format would solve a lot of problems I've
mentioned so I'm happy to do that. I'm just a little concerned about
that scenario.

> 2. I'd rather extend the
>
> template<typename CharType>
> message_format<CharType> *create_messages_facet(messages_info const &info);
>
> With an additional overload
>
> template<typename CharType>
> message_format<CharType> *create_messages_facet(messages_info const &info,std::string const &path_format);
>
> This way it would not affect Boost.Locale's ABI (changing sizeof of messages_info)
>

Ah, I'm new to ABIs and whatnot so I wasn't really paying attention.
I'll get that done, but I'd also like to know about my concerns with the
first issue, as this implies a single path.

> 3. When you use format
>
> (format(path_formats[k]) % search_paths[i] % paths[j] % lc_cat % domain).str()
>
> It is better to call
>
> (format(path_formats[k]) % search_paths[i] % paths[j] % lc_cat % domain).str(std::locale::classic())
>
> To prevent some problems with global locale or other stuff.

Alrighty.

Thanks for your time,
Jookia.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk