Difference between revisions of "Translation for developers/it"

Jump to navigation Jump to search
no edit summary
 
(10 intermediate revisions by the same user not shown)
Line 26: Line 26:
*Avvialo andando nella sottocartella kiwix e eseguendo "kiwix".
*Avvialo andando nella sottocartella kiwix e eseguendo "kiwix".


''Remark: If you are not able to compile Kiwix, or do not have xulrunner available (is the case for example on Ubuntu Oneiric and further) you will still be able to start kiwix and get an interface although the application won't work correctly, but that's enough for example to manipulate the XUL files. In this case you will have to make a few additional steps like add "MaxVersion=42.*" as new line to kiwix/application.ini and launch Kiwix using this command in the "kiwix" directory "firefox -app application.ini"''.
''Nota: Se non sei capace di compilare Kiwix o non hai xulrunner (è il caso per esempio di Ubuntu Oneiric e successivi) sarai comunque in grado di avviare kiwix e avere un'interfaccia anche se l'applicazione non funziona correttamente, ma è sufficiente per manipolare file XUL. In questo caso dovrai fare operazioni aggiuntive come aggiungere la nuova riga "MaxVersion=42.*" in kiwix/application.ini e avviare Kiwix usando il comando "firefox-app application.ini" nella cartella "kiwix"''.


== Aggiungi una stringa alle traduzioni ==
== Aggiungi una stringa alle traduzioni ==
Line 34: Line 34:
Naviga tra i file *.xul e *.js per trovare stringhe con codice (in inglese).
Naviga tra i file *.xul e *.js per trovare stringhe con codice (in inglese).


If you find one you need to find a string identifier (foobar for example), have a look to the already localized string to see how it should look like. The most important to know is that in the *.xul files, it should look like "&foobar;" and in the *.js like "getProperty('foobar')".
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ù importante da ricordare è che nei file *.xul dovrebbe apparire come "&foobar;" mentre nei file *.js come "getProperty('foobar')".


=== Translate it in the master language English ===
=== Translate it in the master language English ===


You will need to do that on two places. 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.


=== Aggiorna i file Translatewiki ===
=== 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 another 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 54: Line 54:
=== Crea una bozza di traduzione della tua nuova stringa per tutte le lingue ===
=== 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 localized string for all supported user interface languages in Kiwix. If you don't do that, Kiwix won't be able to work correctly in a language other than 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 TW2PL.pl script (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 73: Line 73:
== Aggiorna le traduzioni di Kiwix ==
== Aggiorna le traduzioni di Kiwix ==


Another task is to update already supported Kiwix languages with the last strings updated coming from Translatewiki. The first thing to know about that is that in the remote subversion repository, the Translatewiki file (in maintenance/translatewiki) is updated every two weeks from a Translatewiki contributors. That means, you only need to update your local repository and update and commit the kiwix code translation files like this:
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 85: Line 85:
== Aggiungi a Kiwix il supporto ad una nuova lingua ==
== 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 there are more languages in the "maintenance_tools/translatewiki" directory than in the "kiwix/kiwix/chrome/locale" directory. In such a case, that simply means 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 this:
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 preferred 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.


Successivamente modifica "chrome/content/main/js/language.js" e aggiungi anche qui la nuova lingua.
Successivamente modifica "chrome/content/main/js/language.js" e aggiungi anche qui la nuova lingua.
Line 99: Line 99:
Ora aggiorna CHANGELOG e crea una notifica dell'aggiunta della nuova lingua supportata.
Ora aggiorna CHANGELOG e crea una notifica dell'aggiunta della nuova lingua supportata.


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


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

Navigation menu