Traduzioni#

Nonostante l’inglese sia la lingua officiale di base dei progetti di UBports, crediamo che tu abbia il diritto di usare la lingua che tu voglia.

Stiamo lavorando duramente per raggiungere questo obiettivo e anche voi potete aiutarci. Siete voi a decidere quanto tempo potete dedicare alla traduzione. Dai minuti alle ore, tutto conta.

How does a text get translated (technical background)#

La maggior parte delle applicazioni in esecuzione su Ubuntu Touch utilizzano GNU gettext per le traduzioni. Un file di modello .pot contiene una stringa di applicazioni. Da questo modello per ogni lingua deriva un singolo file .po. Questi file .po contengono le traduzioni effettive. Per aggiungere una nuova lingua è necessario creare un nuovo file .po. Per tradurre una stringa il file .po deve essere modificato. Accanto alla stringa originale (in inglese nella maggior parte dei casi) la traduzione appropriata deve essere inserita seguendo la sintassi del file gettext .po. Alcune applicazioni utilizzano QtLinguist per la traduzione. Essa segue gli stessi pricipi utilizzando solo i file .ts per le traduzioni con un’altra sintassi. Come modello uno .ts file viene utilizzato.

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.

Una volta che le stringhe sono state tradotte, sono resi disponibili per gli utenti con una nuova versione di un’app.

Metodi di traduzione#

There are three commonly used ways to translate an app:

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

La maggior parte delle applicazioni mantenute dai singoli sviluppatori utilizzano principalmente i file .pot/.po per la traduzione. Coloro che generalmente hanno bisogno di essere modificati manualmente e impegnati al repo delle applicazioni.

How-To (Come fare)#

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.

Per ciò, vai su UBports Weblate e clicca sul bottone «Registrati». Quindi nella pagina di «Registrazione», avrai due opzioni:

  • Registrarti con un indirizzo di posta valido, un nome utente e il tuo nome per esteso. Dovrai pure passare una semplice domanda di controllo di accessi.

  • Registrarti usando una registrazione di terze parti. L’attuale sistema supporta account di openSUSE, GitHub, Fedora, e Ubuntu.

Once you’re logged in, the site is self-explanatory and there you’ll find all the options and customization you can do.

Ora, vai avanti. Il primo passo è verificare che ci sia la tua lingua per il progetto che hai scelto. Se la tua lingua non è disponibile per un progetto specifico, puoi aggiungerla tu stesso.

Editor di file .po/.ts#

Se vuoi lavorare con i file .po/.ts, devi sapere cosa stai facendo di sicuro. La prima cosa che dovresti sempre ricordare è:

Avvertimento

Non impegnare mai i file .po nei progetti tradotti con weblate. Questo potrebbe interrompere l’intero processo di scambio di traduzioni con weblate.

Come è stato detto sopra, è necessario un editor di file di propria scelta e un account GitHub/GitLab per tradurre direttamente i file .po/.ts. Idealmente si è già configurato clickable e si sa come costruire un’applicazione.

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

For high quality translations it is recommended to go through all of the steps given below. Although if you are not familiar with building apps using clickable, skip the steps 4. to 6. Although, you may not be able to translate the latest strings and you will not know if the strings fit into the apps layout.

Come procedere:

  1. Fork the apps repo into your GitHub or GitLab account

  2. Clone the repo locally or use GitLab’s online editor

  3. (optional) Create a new branch for the translation

  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. Translate all strings

  7. Build and install the app on your device and test the translations

  8. (optional) Repeat steps 6. and 7. until you are satisfied with your work

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

  10. Open a merge/pull request from your fork to the apps repo

Comunicazione con il gruppo di traduzioni#

Si può parlare con altri per quanto riguarda le traduzioni utilizzando la categoria forum che UBports fornisce per questo compito. Per utilizzarlo è necessario registrarsi, o effettuare il login se sei già registrato.

L’unico requisito è di iniziare il tuo post precisando la tua lingua tra parentesi nel campo «Inserisci qui il titolo del tuo tema». Ad esempio, [Spagnolo] Come tradurre whatever?

Nelle tue interazioni con il gruppo, troverai il modo migliore per coordinare le tue traduzioni.

Licenza#

Tutte i progetti di traduzione, così come tutti i tuoi contributi a questo progetto sono sotto una licenza`Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) <https://creativecommons.org/licenses/by-sa/4.0/>`_ che esplicitamente accetti per contribuire al progetto.

Vai a quel collegamento per sapere ciò che significa esattamente.