1 // Copyright (c) 2014, Thomas Goyne <plorkyeran@aegisub.org>
2 //
3 // Permission to use, copy, modify, and distribute this software for any
4 // purpose with or without fee is hereby granted, provided that the above
5 // copyright notice and this permission notice appear in all copies.
6 //
7 // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8 // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9 // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10 // ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11 // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12 // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13 // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
14 //
15 // Aegisub Project http://www.aegisub.org/
16 
17 #include <boost/locale/gnu_gettext.hpp>
18 #include <boost/locale/localization_backend.hpp>
19 #include <unicode/locid.h>
20 
21 // Boost.locale doesn't support partial builds of ICU, so provide stub versions
22 // of some of the things we don't use
23 namespace boost { namespace locale {
24 namespace impl_icu {
25 struct cdata {
26 	icu::Locale locale;
27 	std::string encoding;
28 	bool utf8;
29 };
30 
create_formatting(std::locale const & in,cdata const & cd,character_facet_type type)31 std::locale create_formatting(std::locale const& in, cdata const& cd, character_facet_type type) {
32 	return in;
33 }
34 
create_parsing(std::locale const & in,cdata const & cd,character_facet_type type)35 std::locale create_parsing(std::locale const& in, cdata const& cd, character_facet_type type) {
36 	return in;
37 }
38 
create_calendar(std::locale const & in,cdata const & cd)39 std::locale create_calendar(std::locale const& in, cdata const& cd) {
40 	return in;
41 }
42 
43 }
44 namespace gnu_gettext {
45 template<>
create_messages_facet(messages_info const & info)46 message_format<char> *create_messages_facet(messages_info const &info) {
47 	return nullptr;
48 }
49 
50 template<>
create_messages_facet(messages_info const & info)51 message_format<wchar_t> *create_messages_facet(messages_info const &info) {
52 	return nullptr;
53 }
54 
55 #ifdef BOOST_HAS_CHAR16_T
56 template<>
create_messages_facet(messages_info const & info)57 message_format<char16_t> *create_messages_facet(messages_info const &info) {
58 	return nullptr;
59 }
60 #endif
61 
62 #ifdef BOOST_HAS_CHAR32_T
63 template<>
create_messages_facet(messages_info const & info)64 message_format<char32_t> *create_messages_facet(messages_info const &info) {
65 	return nullptr;
66 }
67 #endif
68 }
69 } }
70