Help:Extension:Translate/Message groups/cs

From mediawiki.org
This page is a translated version of the page Help:Extension:Translate/Message groups and the translation is 38% complete.

Skupiny sdružují několik zpráv. Mají popis a říkají, kde se zprávy ukládají, jak mohou být exportovány (většinou pomocí FFS), jak jsou načteny definice (ze stránek wiki nebo pomocí FFS) a další věci.

Konfigurace skupiny zpráv

Schéma inheritace pro třídy skupiny definováno v Translate extensions

MessageGroupBase (*1)

  • AggregateMessageGroup
  • FileBasedMessageGroup
    • SingleFileBasedMessageGroup
      • MediaWikiExtensionMessageGroup
    • MediaWikiMessageGroup

MessageGroupOld (*1)

  • CoreMessageGroup
    • CoreMostUsedMessageGroup
  • WikiMessageGroup
    • RecentMessageGroup
      • RecentAdditionsMessageGroup
    • SvgMessageGroup (*2)
    • WikiPageMessageGroup (*3)
    • WorkflowStatesMessageGroup

(*1) MessageGroupBase je novější základní třída. Tyto skupiny jsou obvykle definovány Yaml konfigurací, ty skupiny, které rozšiřují MessageGroupOld jsou definovány jinak. Core*MessageGroup jsou pro MediaWiki a čekají na migraci do FileBasedMessageGroup.

(*2) V rozšíření TranslateSvg.

(*3) Poskytuje možnost překládání strany .

Hlavní funkce

Základní informace. Každá skupina zpráv má unikátní (v rámci wiki) id, krátké jméno a krátký popis, který zahrnuje důležité informace jako licenci a odkaz na stránku s více informacemi.

Jmenný prostor. Všechny definice zpráv a překladů jsou uloženy ve jmenném prostoru určeného skupinou zpráv. The file based message groups allow users to set the namespace, while the others are hard coded to NS_TRANSLATIONS (page translation) or NS_MEDIAWIKI.

Checkers. Message groups can give a list of message checkers, that can warn the user in case of errors in translation. Common checks are for missing or unknown variables and invalid html.

Mangler. Each group has a message key mangler. It is mostly relevant only to file based message groups where the format of the message keys cannot be enforced. See the mangler section below.

Message loading. There are many methods for loading message definitions. The load method usually reads the messages from files via FFS class or from a database table. getDefinitions is a shortcut for loading the messages in the source language (see below).

Source language. All of the message definitions are expected to be in a single language. Only dynamic message groups like RecentMessageGroup can work around this limitation.

Tags. Messages can have tags. Tags ignored and optional are often used. In addition, message collection provides its own additional tags.

Workflow states. Message groups can override the global workflow states.

Jazyky. By default all known languages accept translations. The message groups can provide a subset of languages to disable translation in the others.