Preguntas frecuentes#

Configuración#

¿Cómo se crea un flujo de trabajo automatizado?#

Weblate es capaz de manejar semiautomáticamente todos los procesos de traducción por usted. Si le otorga el acceso de envío a su repositorio, las traducciones pueden integrarse sin interacción por su parte, a menos que ocurra un conflicto de fusión.

  1. Set up your Git repository to tell Weblate when there is any change, see Actuadores de notificación for info on how to do it.

  2. Set a push URL at your Configuración de componentes in Weblate, this allows Weblate to push changes to your repository.

  3. Turn on Enviar al consignar on your Configuración de componentes in Weblate, this will make Weblate push changes to your repository whenever they happen at Weblate.

¿Cómo se accede a repositorios a través de SSH?#

Please see Accessing repositories for info on setting up SSH keys.

¿Cómo se arreglan los conflictos de fusión en las traducciones?#

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 Manage 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.

Nota

Depending on your setup, access to the Weblate repository might require authentication. When using the built-in Git exporter in Weblate, you authenticate with your username and the API key.

# Open an existing 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

Si utiliza una multitud de ramas con Weblate, puede hacer que se efectúen los mismos cambios en todas:

# 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

En el caso de los archivos PO de gettext, existe una forma de fusionar conflictos semiautomáticamente:

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):

# 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

¿Cómo traduzco varias ramas al mismo tiempo?#

Weblate supports pushing translation changes within one Configuración de proyectos. For every Configuración de componentes 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.

Una vez que fusione los cambios de Weblate, tal vez tenga que fusionar estas ramas (en función de su flujo de trabajo de desarrollo) y descartar cualquier diferencia:

git merge -s ours origin/maintenance

¿Cómo traducir proyectos multiplataforma?#

Weblate admite una amplia gama de formatos de archivo (vea Formatos de archivo admitidos) y el camino más sencillo consiste en utilizar el formato nativo para cada plataforma.

Once you have added all platform translation files as components in one project (see Añadir proyectos y componentes de traducción), you can utilize the translation propagation feature (turned on by default, and can be turned off in the Configuración de componentes) to translate strings for all platforms at once.

¿Cómo se exporta el repositorio Git que utiliza Weblate?#

There is nothing special about the repository, it lives under the 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 inside Weblate to automate this.

¿Qué opciones existen para enviar los cambios al proyecto originario?#

Esto en gran medida depende de su infraestructura, y Weblate es muy flexible en esta área. A continuación se proporcionan algunos ejemplos de flujos de trabajo en los que se integra Weblate:

  • Weblate automatically pushes and merges changes (see ¿Cómo se crea un flujo de trabajo automatizado?).

  • 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.

Por supuesto, puede combinarlos todos como guste.

¿Cómo hago para limitar el acceso de Weblate a las traducciones solamente y no exponer el código fuente?#

Es posible utilizar git submodule para separar las traducciones del código fuente sin dejar de tenerlas bajo control de versiones.

  1. Cree un repositorio que contenga sus archivos de traducción.

  2. Añádalo como submódulo a su base de código:

    git submodule add git@example.com:project-translations.git path/to/translations
    
  3. Enlace Weblate a este repositorio y ya no necesitará acceder al repositorio que contiene su código fuente.

  4. Puede actualizar el repositorio principal con las traducciones provenientes de Weblate así:

    git submodule update --remote path/to/translations
    

Consulte la documentación de git submodule para obtener más información.

¿Cómo puedo comprobar que he configurado mi Weblate adecuadamente?#

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.

Why are all commits committed by Weblate <noreply@weblate.org>?#

This is the default committer name, configured by DEFAULT_COMMITER_EMAIL and DEFAULT_COMMITER_NAME.

The author of every commit (if the underlying VCS supports it) is still recorded correctly as the user that made the translation.

For commits where no authorship is known (for example anonymous suggestions or machine translation results), the authorship is credited to the anonymous user (see ANONYMOUS_USER_NAME). You can change the name and e-mail in the management interface.

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. Lock the affected component in Weblate.

  2. Confirme los cambios pendientes y combínelos en el repositorio ascendente.

  3. Disable receiving webhooks the Configuración de proyectos; 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 Configuración de componentes to match the new setup; upon changing configuration, Weblate will fetch the updated repository and notice the changed locations while keeping existing strings.

  6. Unlock the component and re-enable hooks in the project configuration.

Uso#

How do I review the translations of others?#

  • There are several review based workflows available in Weblate, see Flujos de trabajo de traducción.

  • You can subscribe to any changes made in Notificaciones 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.

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.

¿Cómo puedo utilizar traducciones existentes mientras traduzco?#

  • Todas las traducciones que se realicen dentro de Weblate pueden reutilizarse gracias a su memoria de traducción compartida.

  • Es posible importar archivos de memoria de traducción existentes en Weblate.

  • 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 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.

Does Weblate update translation files besides translations?#

Weblate trata de limitar al mínimo los cambios efectuados en los archivos de traducción. Sin embargo, esto no es posible en ciertos tipos de archivo y se producirán cambios de formato. Si quiere mantener el formato de sus archivos según su predilección, tendrá que servirse de algún actuador preconsigna.

¿De dónde vienen las definiciones de los idiomas y cómo puedo agregar las mías propias?#

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.

Ver también

Definiciones de idioma

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:

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.

¿Por qué Weblate sigue mostrando cadenas de traducción viejas luego de que he actualizado la plantilla?#

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.

Nota

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.

How to handle renaming translation files?#

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. Lock the translation component in Managing version control repository.

  2. Commit pending changes in Managing version control repository.

  3. Merge Weblate changes to the upstream repository.

  4. Disable receiving updates via hooks using Activar actuadores.

  5. Perform the renaming of the files in the repository.

  6. Update the component configuration to match new file names.

  7. Enable update hooks and unlock the component.

Solución de problemas#

Las peticiones a veces fallan con el error «demasiados archivos abiertos»#

Esto sucede en ocasiones cuando su repositorio Git ha crecido en demasía y tiene muchos. Comprimir los repositorios Git mejorará la situación.

La manera más sencilla de hacerlo es ejecutar lo siguiente:

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

Ver también

DATA_DIR

Cuando entro en el sitio recibo un error «Petición incorrecta (400)»#

Previsiblemente, esto se debe a una configuración inadecuada de ALLOWED_HOSTS. Aquí deben figurar todos los nombres de anfitrión a los que se desea acceder en su Weblate. Por ejemplo:

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

Ver también

Allowed hosts setup

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.

  • In case the translation to the source language is desired, please change the Idioma del código fuente in the component settings. You might want to use English (Developer) as a source language, or utilize Quality gateway for the source strings.

  • En caso de que no se necesite el archivo de traducción correspondiente al idioma de origen, elimínelo del repositorio.

  • En caso de que se necesite el archivo de traducción del idioma de origen pero Weblate debería ignorarlo, ajuste el Filtro de idioma para excluirlo.

Consejo

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 Procesamiento de códigos de idioma for more details.

Funciones#

¿Weblate admite sistemas de control de versiones aparte de Git y Mercurial?#

Weblate currently does not have native support for anything other than Git (with extended support for Solicitudes de incorporación de GitHub, Gerrit and Desestabilización) and Mercurial, but it is possible to write backends for other VCSes.

You can also use Auxiliares remotos de Git in Git to access other VCSes.

Weblate also supports VCS-less operation, see Archivos locales.

Nota

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.

¿Cómo Weblate da crédito a los traductores?#

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.

¿Por qué Weblate fuerza la visualización de todos los archivos PO en un único árbol?#

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.

Distinto en la versión 4.2: Los traductores pueden traducir todos los componentes de un proyecto en un idioma determinado en su totalidad.

¿Por qué Weblate utiliza códigos de idioma tales como sr_Latn o zh_Hant?#

These are language codes defined by RFC 5646 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.

Nota

Weblate defaults to POSIX style language codes with underscore, see Definiciones de idioma for more details.