WeblateOrg / WeblateOrg/weblate

Needs editing marking generates confusing commits

Open
#19,132 0 comments 0 reactions 1 assignee Claimed by @amCap1712 View on GitHub
Area: Processing Waiting for: Implementation
Dominant language
Python
Stars
6.1k
Forks
1.4k
Avg merge
9h 53m
Merged PRs (30d)
395

Description

### Describe the issue

Under certain circumstances, Weblate generates confusing commits like:

```diff
commit 696cdad60b9acd5f2efbffef2436d920ec9c3fd1
Author: Anonymous
Date: Fri Apr 3 14:36:13 2026 +0200

Translated using Weblate (French)

Currently translated at 99.1% (1104 of 1114 strings)

Translation: X/X
Translate-URL: https://hosted.weblate.org/projects/x/x/fr/

diff --git a/x/fr.json b/x/fr.json
index 926b6a41..434fb4ff 100644
--- a/x/fr.json
+++ b/x/fr.json
@@ -1193,4 +1193,4 @@
"x": "c",
"y": "b",
"z": "a"
-}
\ No newline at end of file
+}
```

### I already tried

- [x] I've read and searched [the documentation](https://docs.weblate.org/).
- [x] I've searched for similar filed issues in this repository.

### Steps to reproduce the behavior

1. Create a repository monolingual translation using format that doesn't store needs editing flag and that has no trailing line
2. Import this into Weblate
3. Change the source string so that Weblate marks the string as needing editing
4. Trigger commit on the component

### Expected behavior

1. There should be no commit if the format doesn't support storing the flag
2. If the format supports storing the flag, it should be properly linked with the user who did the edit. Currently it seems to be last author that did change content of given unit, what might be years old or *Anonymous*.

### Screenshots

_No response_

### Exception traceback

```pytb

```

### How do you run Weblate?

Git checkout

### Weblate versions

_No response_

### Weblate deploy checks

```shell

```

### Additional context

This is wrong for two reasons:

* The edit itself should not be needed - we should ignore edits that only add a needs editing flag to formats that cannot store it.
* The commit is wrongly authored; instead of taking the author of the source string edit, it takes the last content author of the unit.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.