WeblateOrg / WeblateOrg/weblate

[DEFAULT] section of ini files is duplicated in all sections

Open
#10,831 2 comments 0 reactions 0 assignees View on GitHub
Blocked by upstream Waiting for: Demand
Dominant language
Python
Stars
6.1k
Forks
1.4k
Avg merge
9h 53m
Merged PRs (30d)
395

Description

### Describe the issue

When weblate pushes translated ini files that have a `[DEFAULT]` section, the section content is duplicated on every other sections in the ini file. See https://codeberg.org/earl-warren/forgejo/pulls/2/files for an example output.

### 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

* Import the ini file
```ini
[DEFAULT]
foo = bar
[mysection]
frob = nitz
```
* Translate nitz & push

## What happens:

* The pushed ini file contains
```ini
[DEFAULT]
foo = bar
[mysection]
foo = bar
frob = translated
```

### Expected behavior

The pushed ini file contains

```ini
[DEFAULT]
foo = bar
[mysection]
frob = translated
```

### Screenshots

_No response_

### Exception traceback

_No response_

### How do you run Weblate?

Other

### Weblate versions

https://translate.codeberg.org Weblate 5.3.1

### Weblate deploy checks

_No response_

### Additional context

https://codeberg.org/earl-warren/forgejo/pulls/2/files is an example of a pull request created by weblate 5.3.1 that exhibits the problem.

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.