Content translation/Specification/fr

Prototype
Le prototype qui sert aussi de modèle de référence est disponible sur : http://pauginer.github.io/prototype-translate/content-translation.html

Architecture
Voir le document d'architecture

Widgets
The CX UI consists of 4 component widgets - The header, source article widget, translation widget, translation tools widget.



Communication entre widgets
Nous séparons les responsabilités et nous suivons une approche conduite par les événements. Représentez-vous le comme un gestionnaire unique global d'événements. Widgets subscribe to events, widgets publish events (fire), widgets can attach and detach from the event registers.

Supposez que vous cliquez sur un mot de l'article source. Nous ne faisons aucun appel de méthode ni d'autres widgets. nous affirmerons que le widget de l'article source ne connaît pas les autres widgets. En cliquant sur un mot, le widget va émettre (publier) un événement disant mw.ex.source.word.select. Maintenant, plusieurs consommateurs peuvent souscrire à cet événement. L'un d'eux peut être la colonne de traduction. Les autres seront des outils internes au widget; nous aurons beaucoup d'aides à la traduction.

For event subscribe/publish pattern, we use mw.hook, which is a wrapper on top of $.Callbacks.



Mise en forme de l'interface utilisateur
LESS est utilisé pour l'extension.



Conventions de nommage

 * La traduction de contenu est abbrégée partout en cx.
 * Chaque nom de classe CSS doit avoir un préfixe cx.
 * Tous les modules RL ont le préfixe ext.cx
 * The jquery object namespace is mw.cx
 * CSS classes follow BEM naming conventions
 * Follows MW coding, naming conventions
 * As of late 2016, transition to OOJS is in progress

Flux de travail

 * Starting: From an entry point ("gray interlanguage link"), through a direct link, or through the dashboard
 * Loading the source article and the translation side by side.
 * Initial load: The source column must show a loading indicator. The translation column must have no content. The "+ Add translation" placeholder must be shown in the first section, or in other sections on hover.
 * During translation, each section is auto-saved to a central parallel corpora database.
 * Loading a saved translation: The source and the target column must show loading indicators. The translated text must be loaded with the same content as it had when it was auto-saved.
 * Clicking an empty section pre-fills the translation.
 * If the user selected "no automatic translation", it must remain empty.
 * If the user selected "source text", the source text must be pre-filled with link, reference and template adaptation.
 * If the user selected an MT engine, the machine-translated text must be pre-filled with link, reference and template adaptation.
 * Links
 * Link are adapted automatically when using automatic translation.
 * If text is selected in the target column that can be linked to an existing article in the target wiki, the link card must be shown that allows to link to it.
 * It must be possible to add a link to a non-existing ("red") target article.
 * Clicking a link in the source column must show a link card with the source article (with title and image if available). If a directly corresponding target article exists, it must be shown, too. If not, the user must have the possibility to link to a different article.
 * References
 * Clicking a reference must show reference adaptation card
 * Expressions mathématiques
 * formulas are copied as-is.
 * Modèles
 * A template can be skipped, copied as source (possibly dysfunctional in the target language), or adapted in detail if an equivalent template exists
 * Equivalent template adaptation is described in Templates
 * Catégories
 * Directly corresponding categories are adapted automatically.
 * Publication
 * The article is published as a full-fledged wiki page.
 * Interlanguage links are added using Wikidata sitelinks.



Structure des URLs
Content Translation mainly works on the special page Special:ContentTranslation. Les paramètres de l'URL sont :


 * page &mdash; titre du source
 * targettitle &mdash; titre de la cible
 * from &mdash; langue de la source
 * to &mdash; langue de la cible
 * campaign &mdash; nom de la campagne, principalement pour les journaux

Tests
(à redéfinir en janvier 2017).



Rapports de fautes
Veuillez rapporter les bogues dans [//phabricator.wikimedia.org/maniphest/task/create/?projects=MediaWiki-extensions-ContentTranslation Phabricator] dans le projet MediaWiki-extensions-ContentTranslation. Don't worry about specifying version, severity, hardware, or OS if you don't know.