Taimako:Extension:Fassara/tsarin rukuni
Translators (main help page )
- How to translate
- Best practices
- Statistics and reporting
- Quality assurance
- Message group states
- Offline translation
- Glossary
Translation administrators
- How to prepare a page for translation
- Page translation administration
- Unstructured element translation
- Group management
- Move translatable page
- Import translations via CSV
- Working with message bundles
Sysadmins and developers
Akwai hanyoyi da yawa na ƙara ƙungiyoyin saƙo zuwa Fassara Fassara. Kungiyoyin saƙo sune tarin saƙonni. Yawancin lokaci suna kwatanta su da nau'i ɗaya a cikin software da fayil ɗaya (kuma yawanci ɗaya a kowane harshe don fassarar). Hakanan yana yiwuwa a yi ƙungiyoyi waɗanda suka haɗa da saƙonni daga wasu ƙungiyoyin saƙo. Misali ana iya samun rukunin da ya ƙunshi duk saƙonnin da ke cikin wata software da aka bayar. Ƙungiyoyi kuma za su iya haɗawa da saƙon saƙon kawai, kamar mahimman saƙonnin MediaWiki waɗanda yakamata a fara fassara. Waɗannan ƙungiyoyin mafi girma ba sa taswira kai tsaye zuwa fayiloli ta kowane nau'i na musamman, amma kamar duk ƙungiyoyi ana iya fitar da su cikin tsarin Gettext don amfani da su a wasu kayan aikin fassarar.
Ƙungiyoyin saƙo su ne manyan matakan da masu fassara ke hulɗa da su: don zaɓar saƙon da za su yi aiki da su da farko suna buƙatar zaɓar ƙungiya, sai dai idan suna amfani da binciken fassarar. Ga kowane rukuni muna iya tattara ƙididdiga kuma kowace ƙungiya tana da mai ganowa na musamman. A zahiri, saƙonni sune mafi ƙanƙanta tubalan rubutu waɗanda masu fassara ke fassara ɗaya bayan ɗaya. Hakanan kowane saƙo yana da abin ganowa, wanda galibi ana kiransa maɓalli. Maɓallin baya buƙatar zama na musamman a cikin ƙungiyoyin saƙo.
Daidaitaccen tsarin tsarin rukuni
Yana da sauƙi don ƙara ƙungiyoyin saƙo ta amfani da tsarin YAML.
Duk abin da kuke buƙatar yi shine don ayyana filin suna kuma ƙara fayil ɗin sanyi zuwa $wgTranslateGroupFiles
; duba shafin daidaitawa don ƙarin bayani.
Misali:
wfAddNamespace( 1218, 'FUDforum' );
$wgTranslateGroupFiles[] = "$IP/messagegroups/FUDforum/FUDforum.yml";
Fayil ɗin kanta yana amfani da tsarin tsarin YAML. Ba a bayyana ma'anar kalmar a nan ba, amma yana da sauƙin koya, kuma duk rukunin da aka riga aka yi ana iya amfani da su azaman misalai. Ka tuna amfani da sarari maimakon shafuka don shigarwa. Kowane fayil na iya ayyana ƙungiyoyin saƙo da yawa. Kowane ma'anar rukuni yana rabu da layi mai dashes uku, wanda shine daidaitaccen mai raba takarda a cikin YAML.
An karya ma'anar zuwa ƴan manyan abubuwa: BASIC, FILES, MANGLER, VALIDATORS, INSERTABLES, TAGS, AUTOLOAD, LANGUAGES da TEMPLATE na musamman. Wasu ƙungiyoyin al'ada na iya ƙara ƙarin abubuwan matakin sama. Ba duk ƙungiyoyi ne ke buƙatar ayyana su duka ba.
GASKIYA =
Wannan sashe ya ƙunshi mahimman bayanai game da ƙungiyar, kamar id da suna na musamman. Jerin maɓallai masu yuwuwa (maɓallai na wajibi ana yiwa alama da *):
Maɓalli | Bayani |
---|---|
namespace* | Ko dai sararin samaniya id, akai-akai ko kirtani inda aka adana saƙonnin. Dole ne a ƙara filin suna tukuna Dubi misalin da ke sama. |
icon | Alamar rukunin saƙo. Zai iya goyan bayan duk wani fayil da MediaWiki zai iya ɗauka kuma ana ɗora shi zuwa MediaWiki. Hakanan yana goyan bayan fayiloli daga wuraren ajiyar kafofin watsa labarai da aka raba. |
id* | ID na musamman wanda ke gano wannan rukunin saƙon. |
label* | Mutum mai karanta sunan wannan rukunin saƙon. |
description | Bayanin wannan group na sakon. Ana amfani da cikakken haɗin wiki. |
class* | Nau'in wannan rukunin saƙon - yawanci FileBasedMessageGroup ko AggregateMessageGroup .
|
meta | Amfani da yawa. Idan akwai maɓallan saƙo iri ɗaya na ƙungiyoyin saƙo daban-daban (yawanci a yanayin reshe ko ƙungiyoyin saƙon), rukuni ɗaya ne kawai zai iya zama na farko kuma sauran ƙungiyoyin yakamata su sami meta tare da ƙimar yes .
|
sourcelanguage | Lambar harshe na harshen tushen. Default to en (Turanci). |
codeBrowser | Ana amfani da shi a cikin $1 kawai. Tsarin URL na mai duba kan layi don fayil(s), inda %FILE% da %LINE% za a maye gurbinsu da hanyar fayil mai dacewa da layi - kamar yadda aka bayyana a cikin fayilolin PO sharhi don saƙo - don baiwa masu fassara hanyar haɗin yanar gizo mai fa'ida a cikin taimakon fassarar don wannan sakon. Misali: https://github.com/lonvia/waymarked-trails-site/blob/master/django/%FILE%#L%LINE%
|
support | Configures where the "Ask help" button will redirect the translator. Dole ne ku saka ko dai url ko page da zaɓin params don daidaita sigogin URL. A cikin sigogi zaku iya amfani da %MESSAGE% azaman mai riƙewa don sunan saƙon.
|
Misali:
BASIC:
id: out-freecol
label: FreeCol
icon: wiki://Freecol.png
description: "{{int:bw-desc-freecol}}"
namespace: NS_FREECOL
class: FileBasedMessageGroup
support:
url:
params:
title: "Translation issue with message %MESSAGE%"
body: "[**URL**](https://translatewiki.net/wiki/%MESSAGE%)"
FILES
Wannan sashe yana bayyana tsarin tsarin fayil da tsarin fayilolin saƙo don ƙungiyoyin nau'in FileBasedMessageGroup. Jerin maɓallai masu yuwuwa (maɓallai na wajibi ana yiwa alama da *):
Maɓalli | Bayani |
---|---|
format* | Format of message files. Examples: Yaml , Java , FlatPhp (for a full list, see FORMATS in FileFormatFactory.php).
|
class | Aji wanda ke bayyana tsarin fayilolin saƙo. Deprecated in Translate 2023.07 in favor of format .
|
codeMap | Jerin lambobin yare da suka bambanta da waɗanda ake amfani da su a MediaWiki. Yi amfani da lambar yaren MediaWiki azaman maɓalli da lambar yaren manufa azaman ƙimar. |
sourcePattern* | Inda ake samun fayilolin saƙo. Masu canjin hanya ana tallafawa. |
targetPattern | Yadda ake sunan fayilolin da aka fitar dangane da kundin adireshin fitarwa. Masu canjin hanya ana tallafawa. |
definitionFile | Yi amfani da wannan don ayyana wurin ma'anar fayil ɗin (tare da saƙon tushe na Ingilishi) idan bai bi tsarin tushen tushen ba. Masu canjin hanya ana tallafawa. |
Apple |
Format-specific keys |
header | Sharhin taken fayil na al'ada. |
FlatPhp |
takamaiman maɓallai |
header | Babban fayil na al'ada. Idan ba a ba shi ba, ya ƙare zuwa <?php
|
Gettext |
takamaiman maɓallai |
CtxtAsKey | Yanayi na musamman inda ake amfani da ctxt azaman maɓallin saƙo. Kada a yi amfani da fayilolin Gettext na yau da kullun. |
header |
Custom file header comment. |
keyAlgorithm | Ƙididdiga masu izini: gado da sauƙi. Default: sauki. Sauƙaƙan yana ba da gajerun maɓallan saƙo. |
Java |
takamaiman maɓallai |
header | Sharhin taken fayil na al'ada. |
keySeparator | Halin keɓance maɓalli da ƙima. Default shine = . Hakanan zai iya zama :
|
Json |
takamaiman maɓallai |
nestingSeparator | Halin da ke raba matakan lokacin da abubuwa masu gida suka baci gabaɗaya zaren maɓalli ɗaya. Ta hanyar tsohuwa ba a yin gyare-gyare. Misali: An canza { "top": { "nested": "content" } } zuwa saƙo (zaton / azaman mai raba) tare da maɓalli top/nested da ƙimar content .
|
includeMetadata | Ko don haɗa maɓallin @ metadata tare da bayanin marubuci a cikin fayilolin da aka fitar. Matsalolin gaskiya. |
parseCLDRPlurals | Ko don tantance kalmomin jam'i na CLDR. Default zuwa arya. |
Yaml |
takamaiman maɓallai |
codeAsRoot | Idan an saita zuwa 1 , duk saƙonni suna ƙarƙashin lambar harshe (maimakon a tushen).
|
nestingSeparator | Halin da ke raba matakan lokacin da abubuwa masu gida suka baci gabaɗaya zaren maɓalli ɗaya. Ƙimar ta asali ita ce . . Misali: $misali an canza shi zuwa (zaton . azaman mai raba) saƙo tare da maɓallin $ key da ƙimar abun ciki $.
|
parseCLDRPlurals | Ko don tantance kalmomin jam'i na CLDR. Default zuwa arya. |
Matsalolin hanyoyin sune:
Mai canzawa | Bayani |
---|---|
%CODE% | Lambar harshe (ta shafi codeMap) |
%MWROOT% | Hanyar zuwa shigarwa MediaWiki |
%GROUPROOT% | An bayyana shi da $wgTranslateGroupRoot. |
%GROUPID% | Ƙungiyar saƙo id |
Misali:
FILES:
format: Java
sourcePattern: %GROUPROOT%/commonist/messages_%CODE%.properties
targetPattern: commonist/messages_%CODE%.properties
MAGANGANUN
Mangler hanya ce ta mulle maɓallan saƙo don guje wa maɓallan saƙon da ke karo da juna a ƙungiyoyi da yawa:
Maɓalli | Bayani |
---|---|
class* | Wani nau'in mangler don amfani. Misali: StringMatcher |
StringMatcher | takamaiman maɓallai |
patterns* | Jerin alamu. "*" za a iya amfani dashi azaman kati. |
prefix* | Idan alamu na sama sun yi daidai da saƙo, maɓallin saƙon za a sanya shi da wannan prefix. |
Misali:
MANGLER:
class: StringMatcher
patterns:
- "*"
MASU GASKIYA
Wannan sashe yana ba da damar ayyana waɗanda aka riga aka ƙayyade ko na al'ada masu tabbatarwa.
VALIDATORS:
# wanda aka rigaya ya inganta
- id: InsertableRegex
enforce: true
insertable: true
params: /\$[a-z0-9]+/
# mai tabbatar da al'ada
- class: MyCustomValidator
enforce: true
AUTOLOAD:
MyCustomValidator: Validator.php
= BA'A SAUKI
Wannan sashe yana ba da damar ayyana aji wanda ke ba da shawarar abubuwan da ake sakawa ko amfani da abubuwan da aka riga aka ayyana. Ana iya loda azuzuwan ta atomatik kamar yadda aka bayyana a sashin AUTOLOAD.
INSERTABLES:
# riga-kafi abin sakawa
- class: HtmlTagInsertablesSuggester
# al'ada abun sakawa
- class: FreeColInsertablesSuggester
AUTOLOAD:
FreeColInsertablesSuggester: Insertable.php
TAGS
Yana yiwuwa a sanya tags zuwa saƙonni. Kowane tag yana ɗaukar jerin maɓallan saƙo (bayan mangling). "*" za a iya amfani da shi azaman alamar ƙira. Ana tallafawa alamun masu zuwa:
Maɓalli | Bayani |
---|---|
optional |
Ba a nuna waɗannan saƙonni ta tsohuwa ba, kuma ba sa ƙidaya a matsayin saƙonnin da ba a fassara su ba yayin ƙididdige adadin fassarar. |
ignored | Ba a nuna waɗannan saƙonni kwata-kwata. |
Misali:
TAGS:
optional:
- lang_locale
- lang_dir
ignored:
- charset
= KYAUTA
Wannan abun yana ɗaukar jerin sunayen aji tare da sunayen fayil azaman ƙima. Ta wannan hanyar za a iya haɗa azuzuwan al'ada cikin sauƙi tare da ƙungiyoyin saƙon ku na al'ada. Hanyar ya kamata ta kasance dangi da wurin da fayil ɗin daidaitawar rukuni yake kanta.
Misali:
AUTOLOAD:
ShapadoMessageChecker: Checker.php
TAMBAYA =
Akwai gajeriyar hanya mai amfani idan kuna ma'anar ƙungiyoyin saƙo iri ɗaya. Don guje wa maimaitawa, fara ma'anar farko da wannan maɓalli. Kuna iya amfani da kowane babban maɓalli a matsayin maɓalli don wannan abu. Duk sauran ƙungiyoyi za su yi amfani da waɗannan ma'anoni azaman tsoffin ƙima. Kowace ƙungiya na iya haƙiƙa ƙetare ƙimar tsoho daga samfuri.
Misali:
TEMPLATE:
BASIC:
namespace: NS_SHAPADO
class: FileBasedMessageGroup
description: "{{int:bw-desc-shapado}}"
FILES:
format: Yaml
codeAsRoot: 1
codeMap:
be-tarask: be-TARASK
GROUPS (na AggregateMessageGroup aji) =
Wannan maɓalli kawai yana ɗaukar jerin ids na ƙungiyar wannan rukunin saƙon ya ƙunshi.
Misali:
GROUPS:
- out-shapado-ads
- out-shapado-announcements
- out-shapado-answers
- out-shapado-badges
Ana tallafawa katunan daji. A wannan yanayin ƙungiyar ta tara ba za ta haɗa kanta akai-akai ba ko da ta dace da tsari. Misali:
GROUPS:
- out-shapado-*
Katunan gandun daji na iya zama matsala idan kuna da ƙungiyoyi masu tarawa, saboda ana iya haɗa wasu ƙungiyoyin sau da yawa: duka kai tsaye kuma ta haɗa ƙungiyoyin tarawa.
HARSHE
Wannan maɓalli yana ba da damar ba da izini da hana fassarar cikin takamaiman yaruka na ƙungiyar. Za a toshe fassarar cikin harsunan da ba a yarda ba.
LANGUAGES:
include:
- en
exclude:
- he
- or
LANGUAGES:
whitelist:
- en
blacklist:
- he
- or
Shigar da aka ba da izini ("haɗa") sun ƙetare kowane ƙima a cikin jerin da aka hana ("ban da"). Idan shigarwar da aka yarda ita ce *
wannan yana nufin duk harsuna an yarda. Lissafin da aka yarda kuma na zaɓi ne.
Rukunin saƙo don saƙon mu'amala na musamman ga wiki ɗin ku
Misalin rukunin saƙo don keɓancewar mai amfani na wiki na al'ada, misali don gunkin gefe.
Ƙara lambar mai zuwa a cikin LocalSetting.php
ku kuma maye gurbin wikiname da wani abu mai ma'ana.
$wgHooks['TranslatePostInitGroups'][] = function ( &$list, &$deps, &$autoload ) {
$id = 'wiki-custom';
$mg = new WikiMessageGroup( $id, 'wikiname-messages' );
$mg->setLabel( 'Wikiname User Interface Messages' );
$mg->setDescription( 'This group contains user interface messages used on Wikiname.' );
$list[$id] = $mg;
}