Skip to content

Avoid copying flags when creating monolingual unit #22992

Description

@nijel

With monolingual file formats that support storing flags (PO, XLIFF etc), the current Weblate behavior seems to be that on translation unit creation, the flags that are present at that point in time in the source language file are copied into the translation file.

Any future changes to existing flags in the source language file are not propagated into the translation files. They have to be updated in all translation files outside of Weblate. Depending on the amount of changes and the file format it can be error-prone to make the flags consistent again.

To instead have this managed inside Weblate I see two options:

  1. On unit creation do not copy any flags into the translation file and rely on flag inheritance behavior
    • Perhaps make this a setting for backwards compatibility or other use-cases
  2. Track if a flag was inherited from the source language file or if it was loaded from the translation file, and in the first case propagate any changes that come from the source language file into the translation files

What do you think?

Side note: When per-translation flag support (#12779 & #12815) becomes available, there will be no way to distinguish between "inherited at creation" and "added from UI" flags.

Originally posted by @michael-smt in #21541

Activity

  1. added
    Waiting for: Demand
    Area: File format support
    on Nov 20, 2026
  2. added theissue type on Nov 20, 2026
  3. changed the issue type fromtoon Nov 20, 2026
  4. nijel commented on Nov 20, 2026

    @nijel
    MemberAuthor

    The flags copying is a side effect of copying the whole underlying unit. I don't think it was ever intended (most monolingual formats do not store flags explicitly).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: File format supportWaiting for: Demand

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions