WeblateOrg / WeblateOrg/weblate
Reuse existing folder when creating translations
- Dominant language
- Python
- Stars
- 6.1k
- Forks
- 1.4k
- Avg merge
- 9h 53m
- Merged PRs (30d)
- 395
Description
### Describe the problem
When the language code is a folder name and there are multiple translation components, the newly added translations might not be consistent with existing ones because of different naming policy. For example, `pt-BR` exists in the repository, but `pt_BR` would be created based on the component naming policy.
### Solution brainstorm
In case the folder that would map to the same language already exists, Weblate should reuse that instead of creating a similarly named folder next to it.
### Describe alternatives you have considered
Users should keep a consistent *Language code style* in the component configuration
### Screenshots
_No response_
### Additional context
https://github.com/orgs/WeblateOrg/discussions/15096
Contributor guide
Research direction
No files or tests are named in the issue. Start by tracing the component-creation path that chooses language-code folder names, then verify how it detects an existing equivalent folder. Done means new translations reuse an existing equivalent folder such as pt-BR instead of creating a differently named sibling such as pt_BR.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- internationalization, localization
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100