37 void data (
const char * s,
int len)
override;
38 void pi (
const char * target,
const char *
data)
override;
39 void warning (
const char * message,
int line,
int column)
override;
42 void startTransUnitElement(
const XMLAttributes &atts);
43 void finishTransUnit(
bool hasPlural);
44 void startContextGroup(
const char* resname_c);
45 void endContextGroup();
46 void startPluralGroup(
const char* id_c);
47 void endPluralGroup();
51 std::tuple<std::string, std::string, int>
52 parseSimpleTransUnitId(
const std::string&
id);
57 void checkIdOfPluralTransUnit(std::string
id);
58 void checkNumberOfPluralForms(std::size_t nbPluralFormsInTransUnit);
60 const std::string _languageId;
62 std::shared_ptr<TranslationResource> _currentResource;
65 std::string _resource, _basicId, _pluralGroupId;
66 int _index, _expectedPluralFormIndex;
67 std::string _sourceText;
68 std::vector<std::string> _targetTexts;
70 bool _skipElements =
false;
74 enum class GroupType {
81 Group(GroupType type);
82 virtual ~Group() =
default;
87 Group(
const Group&) =
default;
88 Group(Group&&) =
default;
89 Group& operator=(
const Group&) =
default;
90 Group& operator=(Group&&) =
default;
93 struct ContextGroup final : Group {
94 ContextGroup(
const std::string&
name);
98 struct PluralGroup final : Group {
99 PluralGroup(
const std::string&
id);
103 std::stack<std::unique_ptr<Group>> _groupsStack;
Container for all TranslationResource's belonging to a domain.
Class that holds translation resources within a domain.