Files
moloapp/src/cli/i18n/po_loader.hpp
T
retoor 3c4334cec9 feat: implement MoloApp plans 01-15 with integration
Full C++23 framework tree: runtime, observability, security,
data, app, realtime, supervisor, clients, CLI, example plus
enterprise tenancy, audit, operability, governance,
supplychain. Postgres via docker compose for tests.
2026-10-23 18:20:04 +02:00

24 lines
575 B
C++

#pragma once
#include <string>
#include "i18n/catalog.hpp"
namespace molo::i18n {
struct PoLoadResult {
Catalog catalog = Catalog(Locale::english());
std::string error;
bool ok() const { return error.empty(); }
};
// GNU gettext PO loader: msgid, msgstr, msgid_plural, msgstr[n], msgctxt,
// translator comments (#), multiline strings, C escapes.
class PoLoader {
public:
static PoLoadResult load_file(const std::string& path, const Locale& locale);
static PoLoadResult load_text(const std::string& text, const Locale& locale);
};
} // namespace molo::i18n