Difference between revisions of "Translation for developers/it"

Jump to navigation Jump to search
no edit summary
(Created page with "Se ne trovi una, cerca l'identificatore della stringa (ad esempio foobar), dà un'occhiata alle stringhe già tradotte per vedere come dovrebbe apparire. La cosa più importan...")
 
(34 intermediate revisions by 3 users not shown)
Line 38: Line 38:
=== Translate it in the master language English ===
=== Translate it in the master language English ===


You will need to do that on two place. First in the "kiwix/chrome/locale/en/main/" main.dtd or main.properties files. In that way the Kiwix application knows what to display if the user interface language is English.
Avrai bisogno di farlo in due posti. Prima nel main.dtd o nel file main.properties di "kiwix/chrome/locale/en/main/". In questo modo l'applicazione Kiwix sa cosa mostrare se l'interfaccia utente è in inglese.


=== Update Translatewiki files ===
=== Aggiorna i file Translatewiki ===


But you also need to tell Translatewiki to add this string in the list of string it has to provide (for the Translatewiki translators) to translate. For that you need to checkout an other part of Kiwix code repository. Please run outside of your local kiwix code directory following console command:
Devi anche dire a Translatewiki di aggiungere questa stringa alla lista delle stringhe da far tradurre (per i traduttori di Translatewiki). Per questo devi verificare altra parte del repository di Kiwix. Per favore esci dal tuo repository locale di Kiwix col comando:


<source lang="bash">
<source lang="bash">
Line 48: Line 48:
</source>
</source>


You have now on your computer the translatewiki translations. What you need is only to update the "en" file which is the master language file for Translatewiki. So simply add your new string following the examples of other already inserted strings and commit your "en" file.
Ora hai sul tuo computer le traduzioni di Translatewiki. Ciò che ti serve e solo aggiornare il file "en" la quale è il file della lingua principale per Translatewiki. Quindi aggiungi la nuova stringa seguendo l'esemio degli altri che l'hanno già fatto e spedisci il tuo file "en".


Someone from Translatewiki check each week the "en" file for new strings and synchronized Translatewiki with this file if necessary.
Qualcuno da Translatewiki controlla settimanalmente il file "en" in cerca di nuove stringhe e se necessario sincronizza Transatewiki con questo file.


=== Create stub translation of you new string for all languages ===
=== Crea una bozza di traduzione della tua nuova stringa per tutte le lingue ===


The last thing you need to do is creating stub translation of your new localised string for all supported user interface languages in Kiwix. If you do not that, Kiwix won't be able to work correctly in another language as English.
L'ultima cosa che devi fare è creare una bozza di traduzione della tua nuova stringa per tutte le lingue dell'interfaccia utente di Kiwix. Se non lo fai Kiwix non funzionerà correttamente in una lingua diversa dall'inglese.


For that purpose you need to use the script TW2PL.pl (this is a perl script, so perl needs to be installed) like following (go in the translatewiki file directory):
A questo proposito devi usare lo script TW2PL.pl (è uno script in perl, perciò devi aver installato perl) come segue (va nella cartella dei file di Translatewiki):


<source lang="bash">
<source lang="bash">
Line 63: Line 63:


=== Commit the new Kiwix translation files ===
=== Commit the new Kiwix translation files ===
Now, all the locale file in kiwix/chrome/locale should be update and you should have a lot of (modified) files listed by typing:
Now, all the locale file in kiwix/chrome/locale should be updated and you should have a lot of (modified) files listed by typing:


<source lang="bash">
<source lang="bash">
Line 69: Line 69:
</source>
</source>


After checking everything is OK, you can commit your modifications: ie. the kiwix/chrome/locale directory and the *.xul and/or *.js files you have modified.
Dopo aver verificato che tutto sia corretto, puoi spedire le tue modifiche, cioè la cartella kiwix/chrome/locale e i file *xul e *js che hai modificato.


== Update Kiwix translations ==
== Aggiorna le traduzioni di Kiwix ==


One other task is to update already supported Kiwix languages with the last string updated coming from Translatewiki. The first thing to know about that is that in the remote subversion repository, the Translatewiki file (in maintenance/translatewiki) are each two weeks updated from a Translatewiki contributors. That means, you only need to update your local repository and update and commit the kiwix code translation files like following:
Altra attività è aggiornare lingue già supportate da Kiwix con le ultime stringhe provenienti da Translatewiki. La prima cosa da sapere è che nel repository remoto i file di Translatewiki (in maintenance/translatewiki) sono aggiornati ogni due settimane dai contributori di Translatewiki. Ciò significa che devi solo aggiornare il tuo repository locale e aggiornare e spedire le traduzioni del codice di Kiwix come segue:


<source lang="bash">
<source lang="bash">
Line 81: Line 81:
git push origin master
git push origin master
</source>
</source>
The full path should be the moulinkiwix directory, not the kiwix directory in it.
Il percorso completo dovrebbe essere la cartella moulinkiwix, non la cartella kiwix che contiene.


== Add a new supported language to Kiwix ==
== Aggiungi a Kiwix il supporto ad una nuova lingua ==


Kiwix tries to add only 100% translated languages coming from Translatewiki. So it happens often that they are more languages in the "maintenance_tools/translatewiki" directory than in the "kiwix/kiwix/chrome/locale" directory. In such a case, that simply mean the the Translatewiki language was still not integrated in Kiwix code base. We explain now how to do that.
Kiwix prova ad aggiungere solo le lingue tradotte al 100% da Translatewiki. Così succede spesso che ci sono più lingue nella cartella "maintenance_tools/translatewiki" che nella cartella "kiwix/kiwix/chrome/locale". In questo caso significa semplicemente che la lingua di Translatewiki non era ancora integrata nel codice base di Kiwix. Spieghiamo ora come fare.


First of all you need to create the translation files in a new directory at "kiwix/kiwix/chrome/locale/your_language_iso_code" like following:
Prima di tutto devi creare i file di traduzione in una nuova cartella del tipo "kiwix/kiwix/locale/codice_iso_della_tua_lingua" come segue:


<source lang="bash">
<source lang="bash">
Line 93: Line 93:
</source>
</source>


After that you need go to the kiwix source code directory in "kiwix/chrome" and edit with your prefered text editor the "chrome.manifest" and "chrome.manifest.prod" files. No explanation here, just do like for the already supported languages.
Dopo questo devi andare nella cartella del codice sorgente di Kiwix "kiwix/chrome" e modificare i file "chrome.manifest" e "chrome.mainfest.prod". Nessuna spiegazione, fallo come è già stato fatto per le altre lingue supportate.


Next edit chrome/content/main/js/languages.js and here also add the new languages.
Successivamente modifica "chrome/content/main/js/language.js" e aggiungi anche qui la nuova lingua.


Now update CHANGELOG and make a notice about the addition of the new supported languages.
Ora aggiorna CHANGELOG e crea una notifica dell'aggiunta della nuova lingua supportata.


Add the new language directory and commit like following:
Aggiungi la cartella della nuova lingua e spediscila come segue:


<source lang="bash">
<source lang="bash">

Navigation menu