Actions

Translating LimeSurvey/ht: Difference between revisions

From LimeSurvey Manual

(Created page with "==Personalize yon tradiksyon ki deja egziste==")
(Created page with "* '''[https://momentjs.com/ moment.js]''' : metòd pou kontribiye nan tradiksyon moment.js yo eksplike nan [https://momentjs.com/docs/#/i18n dokiman moment.js ].")
 
(7 intermediate revisions by the same user not shown)
Line 15: Line 15:
==Personalize yon tradiksyon ki deja egziste==
==Personalize yon tradiksyon ki deja egziste==


Sometimes you might want to modify an existing translation so it accommodates your particular survey situation better. In that case, do the following:
Pafwa ou ta ka vle modifye yon tradiksyon ki deja egziste pou li akomode sitiyasyon an patikilye sondaj ou pi byen. Nan ka sa a, fè bagay sa yo:
#Go to [https://translate.limesurvey.org https://translate.limesurvey.org], pick the LimeSurvey version you want to translate and the particular language you want to modify.
#Ale nan [https://translate.limesurvey.org https://translate.limesurvey.org], chwazi vèsyon LimeSurvey ou vle tradui a ak lang patikilye ou vle a. modifye.
#On the bottom of the translation page you will find an option to export all strings as *.po file. Click on the export and save it as *.po file to your local hard-disk:<br />[[File:export_po_file.png]]
#Nan anba paj tradiksyon an w ap jwenn yon opsyon pou ekspòte tout fisèl kòm dosye *.po. Klike sou ekspòtasyon an epi sove li kòm *.po fichye sou disk di lokal ou a:<br /> [[File:export_po_file.png]]
#Download and install [http://www.poedit.net/download.php Poedit].
#Telechaje epi enstale [http://www.poedit.net/download.php Poedit].
#Start Poedit and edit the downloaded *.po file - modify the particular translations.
#Kòmanse Poedit epi modifye dosye *.po ki telechaje - modifye tradiksyon an patikilye.
#When you save the *.po file, a *.mo file is automatically created. The latter will be read by LimeSurvey.
#Lè w sove fichye *.po a, yo kreye yon fichye *.mo otomatikman. LimeSurvey pral li lèt la.
#The last step is to place the particular *.mo file in the right language folder in /locale by replacing the existing one.
#Dènye etap la se mete fichye *.mo an patikilye nan katab lang ki kòrèk la nan /locale lè w ranplase youn ki deja egziste a.
{{Note|For example, the location for French would be <LimeSurvey_root_directory>/locale/fr/LC_MESSAGES/fr.po.}}
{{Remak|Pa egzanp, kote a. pou franse ta dwe<LimeSurvey_root_directory> /locale/fr/LC_MESSAGES/fr.po.}}


<div class="simplebox"> Note: If you are using [https://www.limesurvey.org/editions-and-prices/limesurvey-pro/editions-and-prices-professional LimeSurvey Pro](only for Cooperate and Enterprise users), the team will be happy to place the file for you. Just create a [mailto:support@limesurvey.org support ticket] and attach the *.po file (<u>'''not''' the .*mo</u>).</div>
<div class="simplebox">Remak: Si w ap itilize [https://www.limesurvey.org/editions-and-prices/limesurvey-pro/editions-and-prices-professional LimeSurvey Pro](sèlman pou itilizatè Cooperate ak Enterprise), ekip la pral kontan mete fichye a pou ou. Jis kreye yon [mailto:support@limesurvey.org tikè sipò] epi tache fichye *.po a ( <u>'''pa''' .*mo la</u> ).</div>


==Creating a new translation==
==Kreye yon nouvo tradiksyon==
#First of all, get access to the development version of LimeSurvey. For detailed instructions, access the [[Accessing the source code|source code]].
#Premyèman, jwenn aksè nan vèsyon devlopman LimeSurvey. Pou jwenn enstriksyon detaye, jwenn aksè nan [[Aksè nan kòd sous la|kòd sous]].
#Download and install [https://www.poedit.net/download.php Poedit] .
#Telechaje epi enstale [https://www.poedit.net/download.php Poedit] .
#Now you have to find out the language-code for your language - you can search for your language-code in the [https://r12a.github.io/app-subtags/ IANA Language Subtag Registry].
#Kounye a, ou dwe chèche konnen kòd lang pou lang ou a - ou ka chèche kòd lang ou nan [https://r12a.github.io/app-subtags/ IANA Language Subtag Registry].
#Go into the /locale directory (located in the LimeSurvey root directory) and create a directory named after your language code.
#Ale nan /locale la. anyè (ki sitiye nan anyè rasin LimeSurvey la) epi kreye yon anyè ki gen non kòd lang ou a.
#Download your language template by going to on the following link [https://translate.limesurvey.org/projects/]. Select the project, then any language (e.g. go for the English entry), and scroll to the bottom. There you have the possibility to export the language file as <your_language_code>.po file.
#Telechaje modèl lang ou a lè w ale sou lyen sa a [https://translate.limesurvey.org/projects/]. Chwazi pwojè a, Lè sa a, nenpòt lang (egzanp ale pou antre angle a), epi woule nan pati anba a. Gen ou gen posiblite pou ekspòte fichye lang lan kòm<your_language_code> .po fichye.
#Copy the <your_language_code>.po file to the newly created folder located in the /locale directory.
#Kopi a<your_language_code> .po nan dosye ki fèk kreye a ki sitiye nan anyè /locale a.
#Open the file with Poedit and translate everything you need to translate.
#Louvri fichye a ak Poedit epi tradui tout sa ou bezwen pou tradui.
#To make LimeSurvey know about your language, you must add it in application/helpers/surveytranslator_helper.php (located in the LimeSurvey root directory). Open that file with a text editor and add your language in the same way the other languages are defined in that file.
#Pou fè LimeSurvey konnen lang ou a, ou dwe ajoute li nan aplikasyon an. /helpers/surveytranslator_helper.php (ki sitiye nan anyè rasin LimeSurvey). Louvri fichye sa a ak yon editè tèks epi ajoute lang ou a menm jan ak lòt lang yo defini nan fichye sa a.
#Save - in order to allow LimeSurvey to see the newly added language, save the modified *.po file. This will automatically generate the *.mo file in the same folder, which will be read by LimeSurvey.  
#Save - pou pèmèt LimeSurvey wè lang ki fèk ajoute a, sove dosye modifye *.po a. Sa a pral otomatikman jenere fichye *.mo nan menm katab la, limeSurvey pral li.  
#Send the new *.po file and the updated surveytranslator_helper.php file to [mailto:translations@limesurvey.org translations@limesurvey.org].  
#Voye nouvo fichye *.po a ak fichye surveytranslator_helper.php ajou a [mailto:translations@limesurvey.org translations@limesurvey.org].  


{{Note|If your language use a lot of special character : please check what font must be used for pdf generation (check with dejavusans for example). Then we can add this font file in [[Optional_settings#Statistics_and_response_browsing|alternatepdffontfile]] default configuration.}}
{{Remak|Si lang ou a sèvi ak anpil karaktè espesyal : tanpri tcheke ki font yo dwe itilize pou jenerasyon pdf (tcheke ak dejavusans pou egzanp). Lè sa a, nou ka ajoute fichye font sa a nan [[Optional_settings#Statistics_and_response_browsing|alternatepdffontfile]] konfigirasyon default.}}


{{Note|If you want your name to be linked from/shown on the team page, please write so in the email!}}
{{Remak|Si ou vle non ou pou lye nan/montre sou paj ekip la, tanpri ekri sa nan imèl la!}}


=== Sample code for add a new language ===
=== Egzanp kòd pou ajoute yon nouvo lang ===


<syntaxhighlight lang="php">
<syntaxhighlight lang="php">
    $supportedLanguages['code']['description'] = gT('Language'); // Your language name in English
$supportedLanguages['code']['description'] = gT('Lang'); // Non lang ou an Angle
    $supportedLanguages['code']['nativedescription'] = 'Language in native'; // The native name of your language
$supportedLanguages['code']['nativedescription'] = 'Lang natif natal'; // Non natif natal lang ou a
    $supportedLanguages['code']['rtl'] = (true|false); // RTL  
$supportedLanguages['code']['rtl'] = (vrè|fo); // RTL  
    $supportedLanguages['code']['dateformat'] = integer; // See getDateFormatData function
$supportedLanguages['code']['dateformat'] = nonb antye relatif; // Gade fonksyon getDateFormatData
    $supportedLanguages['code']['radixpoint'] = (0|1); // 0 : ., 1 : , for radix point
$supportedLanguages['code']['radixpoint'] = (0|1); // 0 : ., 1 : , pou pwen radix
    $supportedLanguages['code']['cldr'] = 'code'; // If the related Yii language code differs you can here map your language to a new code
$supportedLanguages['code']['cldr'] = 'kod'; // Si kòd lang Yii ki gen rapò a diferan, ou ka mete lang ou a nan yon nouvo kòd isit la
    $supportedLanguages['code']['momentjs'] = 'code'; // Used by moment.js
$supportedLanguages [ ' code ' ][ ' momentjs ' ] = ' kòd ' ; // Itilize pa moment.js
</syntaxhighlight>
</syntaxhighlight>


=== Other part to be translated ===
=== Lòt pati yo dwe tradui ===


* LimeSurvey use [https://momentjs.com/ moment.js]. When you send the message to [mailto:translations@limesurvey.org translations@limesurvey.org] check what language code must be used.
* LimeSurvey itilize [https://momentjs.com/ moment.js]. Lè w voye mesaj la nan [mailto:translations@limesurvey.org translations@limesurvey.org] tcheke ki kòd lang yo dwe itilize.


* '''[https://momentjs.com/ moment.js]''' : method to contribute to moment.js translation are explained at [https://momentjs.com/docs/#/i18n moment.js documentation].
* '''[https://momentjs.com/ moment.js]''' : metòd pou kontribiye nan tradiksyon moment.js yo eksplike nan [https://momentjs.com/docs/#/i18n dokiman moment.js ].

Latest revision as of 08:42, 24 January 2024

Tradui LimeSurvey

Èske li pa ta bon pou limeSurvey konplètman tradui nan lang natif natal ou a? Ekip LimeSurvey la toujou ap chèche nouvo tradiksyon ak moun ki ede mete ajou sa ki deja egziste yo. Tanpri li enstriksyon sa yo epi pa ezite voye yon imèl bay translations@limesurvey.org si w gen dout oswa si w gen nenpòt lòt kesyon.

Kijan pou tradui - enstriksyon etap pa etap

Mizajou yon tradiksyon ki egziste deja

  1. Enskri sou sit entènèt LimeSurvey la epi konekte sou kont ou.
  2. Ale nan https://translate.limesurvey.org epi konekte la avèk menm non itilizatè ak modpas la.
  3. Chwazi vèsyon LimeSurvey ou vle tradui a epi senpleman kòmanse. Apre yo fin apwouve tradiksyon ou a, li pral otomatikman enkli nan piblikasyon ki estab chak semèn epi non itilizatè ou an pral kredite nan jounal chanjman an.
  4. Si w enterese vin yon premye tradiktè pou lang ou a ak kapasite pou apwouve nouvo tradui. strings, tanpri kontakte nou nan translations@limsurvey.org. Yon pozisyon konsa mande pou yon maksimòm de apeprè inèdtan travay pa semèn - li enpòtan pou nou ke ou serye nan fè sa.

Personalize yon tradiksyon ki deja egziste

Pafwa ou ta ka vle modifye yon tradiksyon ki deja egziste pou li akomode sitiyasyon an patikilye sondaj ou pi byen. Nan ka sa a, fè bagay sa yo:

  1. Ale nan https://translate.limesurvey.org, chwazi vèsyon LimeSurvey ou vle tradui a ak lang patikilye ou vle a. modifye.
  2. Nan anba paj tradiksyon an w ap jwenn yon opsyon pou ekspòte tout fisèl kòm dosye *.po. Klike sou ekspòtasyon an epi sove li kòm *.po fichye sou disk di lokal ou a:
  3. Telechaje epi enstale Poedit.
  4. Kòmanse Poedit epi modifye dosye *.po ki telechaje - modifye tradiksyon an patikilye.
  5. Lè w sove fichye *.po a, yo kreye yon fichye *.mo otomatikman. LimeSurvey pral li lèt la.
  6. Dènye etap la se mete fichye *.mo an patikilye nan katab lang ki kòrèk la nan /locale lè w ranplase youn ki deja egziste a.

Template:Remak

Remak: Si w ap itilize LimeSurvey Pro(sèlman pou itilizatè Cooperate ak Enterprise), ekip la pral kontan mete fichye a pou ou. Jis kreye yon tikè sipò epi tache fichye *.po a ( pa .*mo la ).

Kreye yon nouvo tradiksyon

  1. Premyèman, jwenn aksè nan vèsyon devlopman LimeSurvey. Pou jwenn enstriksyon detaye, jwenn aksè nan kòd sous.
  2. Telechaje epi enstale Poedit .
  3. Kounye a, ou dwe chèche konnen kòd lang pou lang ou a - ou ka chèche kòd lang ou nan IANA Language Subtag Registry.
  4. Ale nan /locale la. anyè (ki sitiye nan anyè rasin LimeSurvey la) epi kreye yon anyè ki gen non kòd lang ou a.
  5. Telechaje modèl lang ou a lè w ale sou lyen sa a [1]. Chwazi pwojè a, Lè sa a, nenpòt lang (egzanp ale pou antre angle a), epi woule nan pati anba a. Gen ou gen posiblite pou ekspòte fichye lang lan kòm<your_language_code> .po fichye.
  6. Kopi a<your_language_code> .po nan dosye ki fèk kreye a ki sitiye nan anyè /locale a.
  7. Louvri fichye a ak Poedit epi tradui tout sa ou bezwen pou tradui.
  8. Pou fè LimeSurvey konnen lang ou a, ou dwe ajoute li nan aplikasyon an. /helpers/surveytranslator_helper.php (ki sitiye nan anyè rasin LimeSurvey). Louvri fichye sa a ak yon editè tèks epi ajoute lang ou a menm jan ak lòt lang yo defini nan fichye sa a.
  9. Save - pou pèmèt LimeSurvey wè lang ki fèk ajoute a, sove dosye modifye *.po a. Sa a pral otomatikman jenere fichye *.mo nan menm katab la, limeSurvey pral li.
  10. Voye nouvo fichye *.po a ak fichye surveytranslator_helper.php ajou a translations@limesurvey.org.

Template:Remak

Template:Remak

Egzanp kòd pou ajoute yon nouvo lang

 $supportedLanguages['code']['description'] = gT('Lang'); // Non lang ou an Angle
 $supportedLanguages['code']['nativedescription'] = 'Lang natif natal'; // Non natif natal lang ou a
 $supportedLanguages['code']['rtl'] = (vrè|fo); // RTL 
 $supportedLanguages['code']['dateformat'] = nonb antye relatif; // Gade fonksyon getDateFormatData
 $supportedLanguages['code']['radixpoint'] = (0|1); // 0 : ., 1 : , pou pwen radix
 $supportedLanguages['code']['cldr'] = 'kod'; // Si kòd lang Yii ki gen rapò a diferan, ou ka mete lang ou a nan yon nouvo kòd isit la
 $supportedLanguages [ ' code ' ][ ' momentjs ' ] = ' kòd ' ; // Itilize pa moment.js

Lòt pati yo dwe tradui