Skip to content

Commit

Permalink
formats: Correctly set approved state on exported XLIFF
Browse files Browse the repository at this point in the history
Issue #3745
  • Loading branch information
nijel committed May 16, 2022
1 parent 431b723 commit 6ef86f1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions weblate/formats/exporters.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,16 @@ def add_unit(self, unit):
self.store_flags(output, unit.all_flags)

# Store fuzzy flag
if unit.fuzzy:
output.markfuzzy(True)
self.store_unit_state(output, unit)

self.storage.addunit(output)

def store_unit_state(self, output, unit):
if unit.fuzzy:
output.markfuzzy(True)
if hasattr(output, "markapproved"):
output.markapproved(unit.approved)

def get_response(self, filetemplate="{project}-{language}.{extension}"):
filename = filetemplate.format(
project=self.project.slug,
Expand Down

0 comments on commit 6ef86f1

Please sign in to comment.