# Frequently Asked Questions

## Configurazione

### How do I restrict which languages can be translated?

To prevent users from starting new translations across a project, open the
project settings, select Workflow, and set
Adding new translation to Disable adding new translations.
Ensure that the project’s categories and components inherit this setting; see
[Settings inheritance](https://docs.weblate.org/it/latest/admin/workspaces.md#workspace-inherited-settings). Project admins can still add translations
when Weblate can create the files.

To allow only selected language codes, configure
[Filtro lingua](https://docs.weblate.org/it/latest/admin/projects.md#component-language-regex) on each component. This filters translation
files rather than controlling who can edit existing translations. See
[Limiting translation languages](https://docs.weblate.org/it/latest/workflows.md#workflow-language-restrictions) for the available controls.

If unexpected languages appear in a glossary, check
[Language files and synchronization](https://docs.weblate.org/it/latest/user/glossary.md#glossary-language-sync): Weblate automatically adds glossary languages
for languages used in the project.

<a id="auto-workflow"></a>

### How to create an automated workflow?

Weblate can handle all the translation things semi-automatically for you. If
you give it push access to your repository, the translations can happen
without interaction, unless some merge conflict occurs.

1. Set up your Git repository to tell Weblate when there is any change, see
   [Agganci di notifica](https://docs.weblate.org/it/latest/api.md#hooks) for info on how to do it.
2. Set a push URL at your [Component configuration](https://docs.weblate.org/it/latest/admin/projects.md#component) in Weblate, this allows Weblate
   to push changes to your repository.
3. Turn on [Push su commit](https://docs.weblate.org/it/latest/admin/projects.md#component-push-on-commit) on your [Component configuration](https://docs.weblate.org/it/latest/admin/projects.md#component) in Weblate,
   this will make Weblate push changes to your repository whenever they happen
   at Weblate.

#### SEE ALSO
* [Localizzazione continua](https://docs.weblate.org/it/latest/admin/continuous.md#continuous-translation)
* [Prevenzione conflitti di merge](https://docs.weblate.org/it/latest/admin/continuous.md#avoid-merge-conflicts)

### How to access repositories over SSH?

Please see [Accessing repositories](https://docs.weblate.org/it/latest/vcs.md#vcs-repos) for info on setting up SSH keys.

<a id="merge"></a>

### How to fix merge conflicts in translations?

Merge conflicts happen from time to time when the translation file is changed in
both Weblate and the upstream repository concurrently. You can usually avoid this by merging
Weblate translations prior to making changes in the translation files (e.g.
before running msgmerge). Just tell Weblate to commit all pending
translations (you can do it in Repository maintenance in the
Operations menu) and merge the repository (if automatic push is not
on).

If you’ve already encountered a merge conflict, the easiest way to solve all
conflicts locally on your machine, is to add Weblate as a remote
repository, merge it into upstream and fix any conflicts. Once you push changes
back, Weblate will be able to use the merged version without any other special
actions.

#### NOTE
If you resolve the conflict in a pull request, merge it with a regular merge
commit. Do not squash merge it. Squash merging creates a new commit instead
of preserving the Weblate commits, so Weblate might not recognize that its
local commits are already included upstream and might need a repository
reset to recover.

#### NOTE
Weblate uses shallow clones by default to reduce cloning time and disk
usage. Because of this, the workflow below works best when you start from an
up-to-date checkout of the upstream repository. If you clone directly from
the exported Weblate repository, or if your upstream checkout is missing
recent commits, `git remote update weblate` can fail with errors such as
`warning: no common commits`, `bad revision`, or missing objects. This
does not necessarily mean that Weblate and the upstream repository have
conflicting changes. Administrators who want to make this workflow more
reliable can adjust [`VCS_CLONE_DEPTH`](https://docs.weblate.org/it/latest/admin/config.md#std-setting-VCS_CLONE_DEPTH).

#### NOTE
Depending on your setup, access to the Weblate repository might require
authentication. When using the built-in [Git exporter](https://docs.weblate.org/it/latest/admin/optionals.md#git-exporter) in Weblate, you
authenticate with your username and the API key.

#### NOTE
Weblate serves the Git repository itself, but it does not serve Git LFS
objects. See [Git LFS](https://docs.weblate.org/it/latest/vcs.md#git-lfs) for supported behavior. Clone repositories using
Git LFS from the upstream repository and add Weblate as another remote. If
you only need Git-tracked files, you can clone from Weblate with
`GIT_LFS_SKIP_SMUDGE=1` to skip downloading Git LFS objects.

The workflow usually looks like this when you start from an up-to-date checkout
of the upstream repository:

```sh
# Open an existing up-to-date checkout of the upstream repository or perform
# a fresh one:
git clone UPSTREAM_REPOSITORY_URL
cd REPO
# Commit all pending changes in Weblate, you can do this in the UI as well:
wlc commit
# Lock the translation in Weblate, again this can be done in the UI as well:
wlc lock
# Add Weblate as remote:
git remote add weblate https://hosted.weblate.org/git/project/component/
# You might need to include credentials in some cases:
git remote add weblate https://username:APIKEY@hosted.weblate.org/git/project/component/

# Update weblate remote:
git remote update weblate

# Merge Weblate changes:
git merge weblate/main

# Resolve conflicts:
edit …
git add …
…
git commit

# Rebase changes (if Weblate is configured to do rebases)
git rebase origin/main

# Push changes to upstream repository, Weblate will fetch merge from there:
git push

# Open Weblate for translation:
wlc unlock
```

If you’re using multiple branches in Weblate, you can do the same to all of them:

```sh
# Add and update Weblate remotes
git remote add weblate-one https://hosted.weblate.org/git/project/one/
git remote add weblate-second https://hosted.weblate.org/git/project/second/
git remote update weblate-one weblate-second

# Merge QA_4_7 branch:
git checkout QA_4_7
git merge weblate-one/QA_4_7
... # Resolve conflicts
git commit

# Merge main branch:
git checkout main
git merge weblates-second/main
... # Resolve conflicts
git commit

# Push changes to the upstream repository, Weblate will fetch the merge from there:
git push
```

In case of gettext PO files, there is a way to merge conflicts in a semi-automatic way:

Fetch and keep a local clone of the Weblate Git repository. Also get a second fresh
local clone of the upstream Git repository (i. e. you need two copies of the
upstream Git repository: An intact and a working copy):

```sh
# Add remote:
git remote add weblate /path/to/weblate/snapshot/

# Update Weblate remote:
git remote update weblate

# Merge Weblate changes:
git merge weblate/main

# Resolve conflicts in the PO files:
for PO in `find . -name '*.po'` ; do
    msgcat --use-first /path/to/weblate/snapshot/$PO\
               /path/to/upstream/snapshot/$PO -o $PO.merge
    msgmerge --previous --lang=${PO%.po} $PO.merge domain.pot -o $PO
    rm $PO.merge
    git add $PO
done
git commit

# Push changes to the upstream repository, Weblate will fetch merge from there:
git push
```

#### SEE ALSO
* [How to export the Git repository that Weblate uses?](#git-export)
* [Localizzazione continua](https://docs.weblate.org/it/latest/admin/continuous.md#continuous-translation)
* [Prevenzione conflitti di merge](https://docs.weblate.org/it/latest/admin/continuous.md#avoid-merge-conflicts)
* [Weblate Client](https://docs.weblate.org/it/latest/wlc.md#wlc)

### How do I translate several branches at once?

Weblate supports pushing translation changes within one [Project configuration](https://docs.weblate.org/it/latest/admin/projects.md#project). For
every [Component configuration](https://docs.weblate.org/it/latest/admin/projects.md#component) which has it turned on (the default behavior), the change
made is automatically propagated to others. This way translations are kept
synchronized even if the branches themselves have already diverged quite a lot,
and it is not possible to simply merge translation changes between them.

Once you merge changes from Weblate, you might have to merge these branches
(depending on your development workflow) discarding differences:

```sh
git merge -s ours origin/maintenance
```

#### SEE ALSO
[Keeping translations same across components](https://docs.weblate.org/it/latest/admin/continuous.md#translation-consistency)

### How to translate multi-platform projects?

Weblate supports a wide range of file formats (see [Formati dei file di localizzazione](https://docs.weblate.org/it/latest/formats.md)) and the
easiest approach is to use the native format for each platform.

Once you have added all platform translation files as components in one project
(see [Adding translation projects and components](https://docs.weblate.org/it/latest/admin/projects.md#adding-projects)), you can utilize the translation propagation
feature (turned on by default, and can be turned off in the [Component configuration](https://docs.weblate.org/it/latest/admin/projects.md#component)) to
translate strings for all platforms at once.

#### SEE ALSO
[Keeping translations same across components](https://docs.weblate.org/it/latest/admin/continuous.md#translation-consistency)

<a id="git-export"></a>

### How to export the Git repository that Weblate uses?

There is nothing special about the repository, it lives under the
[`DATA_DIR`](https://docs.weblate.org/it/latest/admin/config.md#std-setting-DATA_DIR) directory and is named `vcs/<project>/<component>/`. If you
have SSH access to this machine, you can use the repository directly.

For anonymous access, you might want to run a Git server and let it serve the
repository to the outside world.

Alternatively, you can use [Git exporter](https://docs.weblate.org/it/latest/admin/optionals.md#git-exporter) inside Weblate to automate this.

### What are the options for pushing changes back upstream?

This heavily depends on your setup, Weblate is quite flexible in this area.
Here are examples of some workflows used with Weblate:

- Weblate automatically pushes and merges changes (see [How to create an automated workflow?](#auto-workflow)).
- You manually tell Weblate to push (it needs push access to the upstream repository).
- Somebody manually merges changes from the Weblate git repository into the upstream
  repository.
- Somebody rewrites history produced by Weblate (e.g. by eliminating merge
  commits), merges changes, and tells Weblate to reset the content in the upstream
  repository.

Of course you are free to mix all of these as you wish.

<a id="faq-submodule"></a>

### How can I limit Weblate access to only translations, without exposing source code to it?

You can use [git submodule](https://git-scm.com/docs/git-submodule) for separating translations from source code
while still having them under version control.

1. Create a repository with your translation files.
2. Add this as a submodule to your code:
   ```sh
   git submodule add git@example.com:project-translations.git path/to/translations
   ```
3. Link Weblate to this repository, it no longer needs access to the repository
   containing your source code.
4. You can update the main repository with translations from Weblate by:
   ```sh
   git submodule update --remote path/to/translations
   ```

Weblate should be linked to the translation repository directly. It does not
populate submodules when cloning a parent repository, so translation files
inside a submodule are not available through the parent repository. See
[Git submodules](https://docs.weblate.org/it/latest/vcs.md#git-submodules).

Please consult the [git submodule](https://git-scm.com/docs/git-submodule) documentation for more details.

<a id="faq-monitoring"></a>

### How can I check whether my Weblate is set up properly?

Weblate includes a set of configuration checks which you can see in the admin
interface, just follow the Performance report link in the admin interface, or
open the `/manage/performance/` URL directly.

#### SEE ALSO
* [Monitoring Weblate](https://docs.weblate.org/it/latest/admin/install.md#monitoring)
* [Monitoring Celery status](https://docs.weblate.org/it/latest/admin/install.md#monitoring-celery)

### Why are all commits committed by Weblate <[noreply@weblate.org](mailto:noreply@weblate.org)>?

Weblate uses `Weblate <noreply@weblate.org>` as the default **committer** for all
commits, which is configured by [`DEFAULT_COMMITER_EMAIL`](https://docs.weblate.org/it/latest/admin/config.md#std-setting-DEFAULT_COMMITER_EMAIL) and
[`DEFAULT_COMMITER_NAME`](https://docs.weblate.org/it/latest/admin/config.md#std-setting-DEFAULT_COMMITER_NAME). This is a technical identifier showing that
the commit was processed through Weblate.

However, the **author** of each commit is correctly recorded as the individual
user who made the translation (when using Git). This means you can see who
actually translated each string by examining the commit author field. The same
applies to Mercurial; only Subversion does not have this capability.

#### NOTE
In Git, there is a distinction between the committer (who created the commit
object) and the author (who made the changes). Weblate acts as the committer
while preserving individual translator attribution as authors.

For commits where authorship cannot be determined (such as automated changes
from anonymous suggestions or machine translation results), the author is set
to the anonymous user. You can configure the anonymous user’s name and e-mail
in [`ANONYMOUS_USER_NAME`](https://docs.weblate.org/it/latest/admin/config.md#std-setting-ANONYMOUS_USER_NAME).

#### SEE ALSO
[Component configuration](https://docs.weblate.org/it/latest/admin/projects.md#component)

### How to move files in the repository without losing history in Weblate?

To keep the history, comments, or screenshots linked to strings after changing
the files location you need to ensure that these strings are never deleted in
Weblate. These removals can happen in case the Weblate repository is updated,
but the component configuration still points to the old files. This makes
Weblate assume that it should delete all the translations.

The solution to this is to perform the operation in sync with Weblate:

1. Blocca il componente interessato in Weblate.
2. Applica eventuali modifiche in sospeso e uniscile nel repository upstream.
3. Disable receiving webhooks the [Project configuration](https://docs.weblate.org/it/latest/admin/projects.md#project); this prevents Weblate from immediately seeing changes in the repository.
4. Do any needed changes in the repo (for example using **git mv**), push them to the upstream repository.
5. Change the [Component configuration](https://docs.weblate.org/it/latest/admin/projects.md#component) to match the new setup; upon changing configuration, Weblate will fetch the updated repository and notice the changed locations while keeping existing strings.
6. Sblocca il componente e riattiva gli hook nella configurazione del progetto.

#### HINT
[Backup a livello di progetto](https://docs.weblate.org/it/latest/admin/backup.md#projectbackup) might be useful to perform prior to such disrupting changes.

## Usage

### How do I review the translations of others?

- There are several review based workflows available in Weblate, see [Translation workflows](https://docs.weblate.org/it/latest/workflows.md#workflows).
- You can subscribe to any changes made in [Notifiche](https://docs.weblate.org/it/latest/user/profile.md#notifications) and then check
  others contributions as they come in by e-mail.
- There is a review tool available at the bottom of the translation view, where you can
  choose to browse translations made by others since a given date.

#### SEE ALSO
[Translation workflows](https://docs.weblate.org/it/latest/workflows.md#workflows)

### How do I provide feedback on a source string?

On context tabs below translation, you can use the Comments tab to
provide feedback on a source string, or discuss it with other translators.

#### SEE ALSO
* [Ricezione del feedback sulla stringa di origine](https://docs.weblate.org/it/latest/devel/review.md#report-source)
* [Commenti](https://docs.weblate.org/it/latest/user/translating.md#user-comments)

### How can I use existing translations while translating?

- Tutte le traduzioni all’interno di Weblate possono essere usate grazie alla memoria di traduzione condivisa.
- Conferma l’eliminazione di tutti gli elementi dalla memoria traduzione.
- Use the import functionality to load compendium as translations,
  suggestions or translations needing review. This is the best approach for a one-time
  translation using a compendium or a similar translation database.
- You can set up [tmserver](https://docs.weblate.org/it/latest/admin/machine.md#mt-tmserver) with all databases you have and let Weblate use
  it. This is good when you want to use it several times during
  translation.
- Another option is to translate all related projects in a single Weblate
  instance, which will make it automatically pick up translations from other
  projects as well.

#### SEE ALSO
* [Translation services](https://docs.weblate.org/it/latest/admin/machine.md#machine-translation-setup)
* [Suggerimenti automatici](https://docs.weblate.org/it/latest/user/translating.md#machine-translation)
* [Memoria traduzione](https://docs.weblate.org/it/latest/admin/memory.md#memory)

<a id="faq-cleanup"></a>

### Does Weblate update translation files besides translations?

Weblate tries to limit changes in translation files to a minimum. For some file
formats it might unfortunately lead to reformatting the file. If you want to
keep the file formatted your way, please use a pre-commit hook for that.

#### SEE ALSO
[Aggiornamento dei file della lingua di destinazione](https://docs.weblate.org/it/latest/devel/integration.md#updating-target-files)

### How do I merge updated POT file with PO translations?

See [Aggiornamento dei file della lingua di destinazione](https://docs.weblate.org/it/latest/devel/integration.md#updating-target-files) for information on updating PO files when
the POT template changes.

### Where do language definitions come from and how can I add my own?

The basic set of language definitions is included within Weblate and
Translate-toolkit. This covers more than 150 languages and includes info
about plural forms or text direction.

You are free to define your own languages in the administrative interface, you just need
to provide info about it.

#### SEE ALSO
[Language definitions](https://docs.weblate.org/it/latest/admin/languages.md#languages)

### Can Weblate highlight changes in a fuzzy string?

Weblate supports this, however it needs the data to show the difference.

For Gettext PO files, you have to pass the parameter `--previous` to
**msgmerge** when updating PO files, for example:

```sh
msgmerge --previous -U po/cs.po po/phpmyadmin.pot
```

For monolingual translations, Weblate can find the previous string by ID, so it
shows the differences automatically.

### Why does Weblate still show old translation strings when I’ve updated the template?

Weblate does not try to manipulate the translation files in any way other
than allowing translators to translate. So it also does not update the
translatable files when the template or source code have been changed. You
simply have to do this manually and push changes to the repository, Weblate
will then pick up the changes automatically.

#### NOTE
It is usually a good idea to merge changes done in Weblate before updating
translation files, as otherwise you will usually end up with some conflicts
to merge.

#### SEE ALSO
* [Introduzione di nuove stringhe](https://docs.weblate.org/it/latest/devel/integration.md#translations-update)
* [Aggiornamento dei file della lingua di destinazione](https://docs.weblate.org/it/latest/devel/integration.md#updating-target-files)
* [Translating software using GNU gettext](https://docs.weblate.org/it/latest/devel/gettext.md)
* [Translating documentation using Sphinx](https://docs.weblate.org/it/latest/devel/sphinx.md)

### Come gestire la ridenominazione dei file di traduzione?

When renaming files in the repository, it can happen that Weblate sees this as
removal and adding of the files. This can lead to losing strings history,
comments and suggestions.

To avoid that, perform renaming in following steps:

1. Blocca il componente di traduzione in [Gestione del repository VCS locale](https://docs.weblate.org/it/latest/devel/integration.md#manage-vcs).
2. Applica le modifiche in sospeso in [Gestione del repository VCS locale](https://docs.weblate.org/it/latest/devel/integration.md#manage-vcs).
3. Unisci le modifiche Weblate al repository upstream.
4. Disable receiving updates via hooks using [Abilita agganci](https://docs.weblate.org/it/latest/admin/projects.md#project-enable-hooks).
5. Eseguire la ridenominazione dei file nel repository.
6. Aggiorna la configurazione del componente in modo che corrisponda ai nuovi nomi di file.
7. Abilita gli hook di aggiornamento e sblocca il componente.

#### HINT
[Backup a livello di progetto](https://docs.weblate.org/it/latest/admin/backup.md#projectbackup) might be useful to perform prior to such disrupting changes.

## Troubleshooting

### Requests sometimes fail with «too many open files» error

This happens sometimes when your Git repository grows too much and you have
many of them. Compressing the Git repositories will improve this situation.

The easiest way to do this is to run:

```sh
# Go to DATA_DIR directory
cd data/vcs
# Compress all Git repositories
for d in */* ; do
    pushd $d
    git gc
    popd
done
```

#### SEE ALSO
[`DATA_DIR`](https://docs.weblate.org/it/latest/admin/config.md#std-setting-DATA_DIR)

### When accessing the site I get a «Bad Request (400)» error

This is most likely caused by an improperly configured [`ALLOWED_HOSTS`](https://docs.weblate.org/it/latest/admin/install.md#std-setting-ALLOWED_HOSTS).
It needs to contain all hostnames you want to access on your Weblate. For example:

```python
ALLOWED_HOSTS = ["weblate.example.com", "weblate", "localhost"]
```

#### SEE ALSO
[Allowed hosts setup](https://docs.weblate.org/it/latest/admin/install.md#production-hosts)

<a id="faq-duplicate-files"></a>

### What does mean «There are more files for the single language (en)»?

This typically happens when you have translation file for source language.
Weblate keeps track of source strings and reserves source language for this.
The additional file for same language is not processed.

* Nel caso in cui si desideri la traduzione nella lingua sorgente, modifica la [Lingua di origine](https://docs.weblate.org/it/latest/admin/projects.md#component-source-language) nelle impostazioni del componente. Potresti voler usare Inglese (sviluppatore) come lingua sorgente, o usare [Quality gateway for the source strings](https://docs.weblate.org/it/latest/workflows.md#source-quality-gateway).
* Se il file traduzione per la lingua sorgente non è necessaria, rimuovila dal repository.
* In caso serva il file traduzione per la lingua sorgente, ma è ignorato da Weblate, regola il filtro della lingua per escluderlo. Vedi [Filtro lingua](https://docs.weblate.org/it/latest/admin/projects.md#component-language-regex).

#### HINT
You might get similar error message for other languages as well. In that
case the most likely reason is that several files map to single language in
Weblate.

This can be caused by using obsolete language codes together with new one
(`ja` and `jp` for Japanese) or including both country specific and
generic codes (`fr` and `fr_FR`). See [Parsing language codes](https://docs.weblate.org/it/latest/admin/languages.md#language-parsing-codes) for
more details.

## Funzionalità

<a id="faq-vcs"></a>

### Does Weblate support other VCSes than Git and Mercurial?

Weblate currently does not have native support for anything other than
[Git](https://docs.weblate.org/it/latest/vcs.md#vcs-git) (with extended support for
[Richieste di pull GitHub](https://docs.weblate.org/it/latest/admin/code-hosting.md#code-hosting-github-pull-requests), [Gerrit review requests](https://docs.weblate.org/it/latest/admin/code-hosting.md#code-hosting-gerrit), and
[Subversion](https://docs.weblate.org/it/latest/vcs.md#vcs-git-svn)) and [Mercurial](https://docs.weblate.org/it/latest/vcs.md#vcs-mercurial), but it is possible to write
backends for other VCSes.

Weblate also supports VCS-less operation, see [Local files](https://docs.weblate.org/it/latest/vcs.md#vcs-local).

#### NOTE
For native support of other VCSes, Weblate requires using distributed VCS, and could
probably be adjusted to work with anything other than Git and Mercurial, but
somebody has to implement this support.

#### SEE ALSO
[Integrazione controllo versione](https://docs.weblate.org/it/latest/vcs.md#vcs)

### How does Weblate credit translators?

Every change made in Weblate is committed into VCS under the translators name. This
way every single change has proper authorship, and you can track it down using
the standard VCS tools you use for code.

Additionally, when the translation file format supports it, the file headers are
updated to include the translator’s name.

#### SEE ALSO
* [`list_translators`](https://docs.weblate.org/it/latest/admin/management.md#weblate-admin-list_translators)
* [Translation progress reporting](https://docs.weblate.org/it/latest/devel/reporting.md)

### Why does Weblate force showing all PO files in a single tree?

Weblate was designed in a way that every PO file is represented as a single
component. This is beneficial for translators, so they know what they are
actually translating.

#### Versionchanged
Cambiato nella versione 4.2: I traduttori possono tradurre tutti i componenti di un progetto in una lingua specifica nel suo complesso.

<a id="faq-codes"></a>

### Why does Weblate use language codes such sr_Latn or zh_Hant?

These are language codes defined by [**RFC 5646**](https://datatracker.ietf.org/doc/html/rfc5646.html) to better indicate that they
are really different languages instead previously wrongly used modifiers (for
`@latin` variants) or country codes (for Chinese).

Weblate still understands legacy language codes and will map them to
current one - for example `sr@latin` will be handled as `sr_Latn` or
`zh@CN` as `zh_Hans`.

#### NOTE
Weblate defaults to POSIX style language codes with underscore, see
[Language definitions](https://docs.weblate.org/it/latest/admin/languages.md#languages) for more details.

#### SEE ALSO
* [Language definitions](https://docs.weblate.org/it/latest/admin/languages.md#languages)
* [Stile codice lingua](https://docs.weblate.org/it/latest/admin/projects.md#component-language-code-style)
* [Adding new translations](https://docs.weblate.org/it/latest/devel/translations.md#adding-translation)
