From c19f34db2f4a64326d03cee7edae095051660f65 Mon Sep 17 00:00:00 2001 From: maxim nikonov Date: Fri, 6 Feb 2026 02:49:13 +0500 Subject: wip --- fluid/proj/i18n.h | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) (limited to 'fluid/proj/i18n.h') diff --git a/fluid/proj/i18n.h b/fluid/proj/i18n.h index 0d9119ca2..65ef72bf6 100644 --- a/fluid/proj/i18n.h +++ b/fluid/proj/i18n.h @@ -17,7 +17,9 @@ #ifndef FLUID_PROJ_I18N_H #define FLUID_PROJ_I18N_H -#include +#include +#include +#include namespace fld { @@ -54,35 +56,44 @@ public: Project &project_; /// One of the available internationalization types. - fld::I18n_Type type = FLD_I18N_TYPE_NONE; + fld::I18n_Type type; /// Include file for GNU i18n, writes an #include statement into the source /// file. This is usually `` or `"gettext.h"` for GNU gettext. - std::string gnu_include = ""; + char *gnu_include; // Optional name of a macro for conditional i18n compilation. - std::string gnu_conditional = ""; + char *gnu_conditional; /// For the gettext/intl.h options, this is the function that translates text /// at runtime. This is usually "gettext" or "_". - std::string gnu_function = "gettext"; + char *gnu_function; /// For the gettext/intl.h options, this is the function that marks the translation /// of text at initialisation time. This is usually "gettext_noop" or "N_". - std::string gnu_static_function = "gettext_noop"; + char *gnu_static_function; /// Include file for Posix i18n, write a #include statement into the source /// file. This is usually `` for Posix catgets. - std::string posix_include = ""; + char *posix_include; // Optional name of a macro for conditional i18n compilation. - std::string posix_conditional = ""; + char *posix_conditional; /// Name of the nl_catd database - std::string posix_file = ""; + char *posix_file; /// Message set ID for the catalog. - std::string posix_set = "1"; + char *posix_set; public: // Methods - I18n(Project &p) : project_(p) {}; - ~I18n() = default; + I18n(Project &p); + ~I18n(); void reset(); void read(io::Project_Reader &f, const char *key); void write(io::Project_Writer &f) const; + + void set_gnu_include(const char *s); + void set_gnu_conditional(const char *s); + void set_gnu_function(const char *s); + void set_gnu_static_function(const char *s); + void set_posix_include(const char *s); + void set_posix_conditional(const char *s); + void set_posix_file(const char *s); + void set_posix_set(const char *s); }; } // namespace proj @@ -91,4 +102,3 @@ public: // Methods #endif // FLUID_PROJ_I18N_H - -- cgit v1.2.3