ImportedTranslation.h header
#include <ew/app/ImportedTranslation.h>
Namespace ew::app
ImportedTranslation struct
struct ew::app::ImportedTranslation
One translation as it comes back from an external tool, whatever file it arrived in.
Deliberately NOT the shape that was written out. A file is exported carrying a status derived from the project; a file coming back carries only what a person could actually put in it – the translated text, and whether they flagged it for review. A returning file's own idea of whether a translation is current was written BEFORE the translator started, and the writer may have revised the prose since, so staleness is recomputed by ew::core::localization::TranslationCatalog::statusFor rather than believed.
One type for every format on purpose. XLIFF and CSV had their own identical structs for one changelist each, which would have forced the import to carry two overloads or a converter for a distinction that does not exist – the same two-implementations-of-one-thing shape that put a second RFC 4180 parser one decision away from being written.
Members
ew::core::localization::StringId ew::app::localization::ImportedTranslation::id
The string's address, parsed from the file's own id field.
QString ew::app::localization::ImportedTranslation::sourceText
The source text as it stood in the file – what the translator actually saw.
Kept rather than discarded because it is the only honest thing to digest when the translation is stored: if the writer revised the prose after exporting, the returned translation is of the OLD text and must read as stale immediately. Digesting the project's CURRENT source instead would silently certify a translation of words the translator was never shown.
QString ew::app::localization::ImportedTranslation::targetText
The translated text; empty when the entry came back untranslated.
bool ew::app::localization::ImportedTranslation::needsReview = false
Whether the file asked for a human to look at this one – an XLIFF needs-review-* state, a CSV needs-review status, or a fuzzy match from a translation tool.