WeblateOrg / WeblateOrg/weblate

Reuse existing folder when creating translations

Open
#15,148 0 comments 0 reactions 0 assignees View on GitHub
Area: Processing Waiting for: Demand
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.