Traducións

Aínda que o inglés é o idioma base oficial para todos os proxectos de UBports, cremos que tes o dereito de usalo no idioma que queiras.

Estamos a traballar duro para cumprir ese obxectivo e tamén podes axudar. Ti decides canto tempo podes dedicar á tradución. De minutos a horas, todo conta.

Como se traduce un texto (antecedentes técnicos)

Most apps running on Ubuntu Touch use GNU gettext for translations. A .pot template file holds an apps strings. From this template for every language an individual .po file is derived. Those .po files do contain the actual translations. To add a new language a new .po file needs to be created. To translate a string the .po file needs to be edited. Next to the original string (english in most cases) the appropriate translation needs to be entered following the .po gettext file syntax. Some apps do use QtLinguist for translation. It does follow the same priciples only using .ts files for translations with another syntax. As template one .ts file is used.

Within an app strings are marked either this way i18n.tr("string") when using gettext or like this tr("string") when using QtLinguist. When the app is built those translatable strings are extracted and written into the .pot or .ts template files. The .po and .ts language files then need to be updated from their template.

Unha vez traducidas as cadeas, ponse a disposición dos usuarios cunha nova versión dun aplicativo.

Métodos de tradución

Hai tres formas comunmente usadas de traducir un aplicativo:

  • Weblate: A web based translation tool. UBports apps using Weblate can be translated at the UBports translation projects dashboard and the Lomiri translation projects dashboard. There is an automatic transfer of new strings from an apps repo to weblate. Translated strings get back as commits to the repo from weblate.

  • Editor: Translation is done by changing .po files with the editor of your choice, and a GitHub/GitLab account. The .po/.ts files for each project are in their repository on our GitLab organization or on our GitHub organization. After translating the translator commits new translations to an apps repo generally by opening a merge request/pull request.

  • Team translation: We also have a Translation Forum to discuss translating Ubuntu Touch and its core apps. Some projects are using Telegram or Matrix groups too, and some teams are still using the Ubuntu Launchpad framework.

Core apps and some community apps like dekko or TELEports are generally using weblate for translation. This is the preferred way to translate and it does not need any programming skills. Please have a look at the UBports translation projects dashboard and the Lomiri translation projects dashboard. When using weblate do not edit .po files manually. Commiting edited .po files can break the automated process of translation.

Most apps maintained by individual developers are mainly using .pot/.po files for translation. Those generally need to be edited manually and commited to the apps repo.

Guía básica

Hosted Weblate

You can go to UBports translation projects dashboard or the Lomiri translation projects dashboard, go to a project, and start making anonymous suggestions without being registered. If you want to save your translations, you must be logged in.

Para iso, vai a UBports Weblate e prema no botón «Rexistrarse». Unha vez na páxina «Rexistro», atoparás dúas opcións:

  • Rexístrate usando un enderezo de correo electrónico válido, un nome de usuario e o teu nome completo. Tamén terás que resolver unha pregunta de control sinxelo.

  • Rexístrate mediante un rexistro de terceiros. Actualmente o sistema admite contas de openSUSE, GitHub, Fedora e Ubuntu.

Unha vez iniciado sesión, o sitio explícase por si mesmo e alí atoparás todas as opcións e personalización que podes facer.

Agora, segue con iso. O primeiro paso é buscar se o seu idioma xa existe no proxecto que escolla. Se o teu idioma non está dispoñible para un proxecto específico, podes engadilo ti mesmo.

Editor de ficheiros .po/.ts

If you want to work with .po/.ts files directly you need to know what you’re doing for sure. The first thing you should always remember is:

Advertencia

Do never commit .po files to projects that are translated using weblate. This could break the whole translation exchange process with weblate.

As was said up above, you need a file editor of your choice and a GitHub/GitLab account to translate .po/.ts files directly. Idealy you do have clickable set up and know how to build an app.

There are online gettext .po editors and those you can install on your computer. You can choose whatever editor you want, but we prefer to work with free software only. There are too many plain text editors and tools to help you translate .po/.ts files to list here.

Nota

Para traducións de alta calidade recoméndase seguir todos os pasos que se indican a continuación. Aínda que se non está familiarizado coa creación de aplicacións mediante o que se pode premer, omita os pasos 4. a 6. Non obstante, é posible que non poida traducir as últimas cadeas e non saberá se as cadeas encaixan no deseño dos aplicativos.

Como proceder:

  1. Atope o repositorio de aplicativos na súa conta GitHub ou GitLab

  2. Clonar o repositorio localmente ou usar o editor en liña de GitLab

  3. (opcional) Crear unha nova rama para a tradución

  4. Build the app using clickable to get up-to-date .pot/.ts template files

  5. Update the desired .po/.ts language file(s) from the template

  6. Traducir todas as cadeas

  7. Construír e instalar o aplicativo no teu dispositivo e probar as traducións

  8. (opcional) Repita os pasos 6. e 7. ata que estea satisfeito co seu traballo

  9. Push the translated .po/.ts file(s) to your forked repo [do NOT commit .pot/.ts template files]

  10. Abre unha solicitude de combinación / extracción desde a súa bifurcación á reposición de aplicativos

Comunicación do equipo de tradución

Podes falar con outras persoas acerca das traducións usando «a categoría do foro <https://forums.ubports.com/category/39/translations>» _ que UBports ofrece para esta tarefa. Para usalo cómpre rexistrarse ou iniciar sesión se xa está rexistrado.

The only requirement is to start your post putting down your language in brackets in the «Enter your topic title here» field. For example, [Spanish] How to translate whatever?

Nas túas interaccións co teu equipo atoparás o mellor xeito de coordinar as túas traducións.

Licenza

Todos os proxectos de tradución e todas as túas contribucións a este proxecto están baixo un «Creative Commons Recoñecemento-CompartirIgual 4.0 Internacional (CC BY-SA 4.0) <https://creativecommons.org/licenses/by-sa/4.0/>» _ licenza que acepta explícitamente contribuíndo ao proxecto.

Siga esa ligazón para aprender que significa exactamente.