Pacote de Extensão de Idioma MediaWiki

This page is a translated version of the page MediaWiki Language Extension Bundle and the translation is 75% complete.


Pacote de Extensão de Idioma MediaWiki (PEIM) é um conjunto de extensões com curadoria MediaWiki que oferece características plurilíngue. Tenta fornecer uma forma fácil de trazer apoio linguístico abrangente a um MediaWiki.

Visão geral das extensões

A versão atual do PEIM contém seis extensões:

PEIM tem um calendário de lançamento trimestral, para poder facilmente manter-se na vanguarda com o apoio linguístico em constante melhoria. O pacote é testado em relação a versões recentes do MediaWiki, para prevenir a maior parte das interrupções temporárias que aconteceriam se fossem usadas as últimas versões de desenvolvimento das extensões.

Motivação

O Seletor de Idiomas Universal é uma funcionalidade essencial para qualquer usuário, independentemente do número de línguas que falem: seleção de idiomas, suporte de fontes para exibir scripts mal suportados por sistemas operacionais comuns, e métodos de entrada para digitar idiomas que não utilizam o alfabeto latino. Inclui fontes com licença livre, que cobrem a maioria das principais línguas da América, Europa, Oriente Médio, Índia e Sudeste Asiático.

Manter conteúdo multi-idioma num wiki é uma confusão sem a extensão Translate, sendo utilizada pela Wikimedia Foundation, KDE, translatewiki.net e outros sites. With Localisation Update your users will always have the latest translations freshly out of the oven. A extensão Alterações Limpas mantém a sua página de alterações recentes livre da atividade de tradução e de outras confusões.

Não perca a oportunidade de praticar os seus conhecimentos linguísticos enferrujados: use a extensão Babel para marcar as línguas que fala e encontrar outros falantes do mesmo idioma no seu wiki. E, finalmente, a extensão cldr é uma base de dados de traduções de nomes de idiomas e países.

Notas de lançamento e downloads

Latest release

Translate
  • SECURITY: Enhance validation and logging for AggregateGroups API deletions (task T282932)
  • BREAKING CHANGES
Configuration variable changes

To address voice and tone issues in the Translate extension (task T277965) the following configuration variable names have been renamed:

  • TranslateBlacklistTranslateDisabledTargetLanguages
  • TranslateAuthorBlacklistTranslateAuthorExclusionList
  • TranslateCheckBlacklistTranslateValidationExclusionFile

The old variables will be supported for MLEB 2021.07 release but removed in the MLEB 2021.10 release.

If you have defined message groups defined with LANGUAGE attributes, whitelist/blacklist have been changed to include/exclude

UniversalLanguageSelector
  • BREAKING CHANGE: UniversalLanguageSelector extension now requires MediaWiki 1.35 or above.
  • MODERN VECTOR:
    • Position language menu below language button. (task T276248)
    • Fix "ULS settings window can’t be opened with the preferences link on new Vector". (task T282956)

Previous releases

  • 2021.04: https://translatewiki.net/mleb/MediaWikiLanguageExtensionBundle-2021.04.tar.bz2
    sha256sum: 652b7838b4c87fba80ca46ebd15a106bf3fd4e9cc202417de6ee3ad33d2a8048 [1]
    Announcement and Release Notes
    • Compatible with MediaWiki 1.34 and above and requires PHP 7.2 or above.
  • Consider translated optional messages towards meeting the export threshold (task T159122)
  • Do not lock pages indefinitely during translatable page moves (Gerrit change 661125)
  • Limit pages that can be moved from the UI to 500 by default. (task T277431)
    • This can be modified by updating the configuration: $wgTranslatePageMoveLimit
  • Namespace for classes under the src/ folder has been changed to: MediaWiki\Extension\Translate instead of: MediaWiki\Extensions\Translate. class_alias has been used to ensure existing functionality and cached data does not break. The alias will be removed in the next MLEB release.
  • Ensure ULS supports modern Vector (task T273232,task T273928)
  • 2020.04: https://translatewiki.net/mleb/MediaWikiLanguageExtensionBundle-2020.04.tar.bz2
    sha256sum: 97dbf8846c62cbafa43b7b5f359c3fb55039846277ebb55dd7b00e42d356d709 [1]
    Announcement and Release Notes
    • Compatible with MediaWiki 1.33 and above and requires PHP 7.2 or above.
  • Remove PHP based entry point for Translate extension. Use wfLoadExtension( 'Translate' ); to load the Translate extension.
  • Test and add support for PHP 7.4. Now all versions of PHP 7.2 and above are supported.
  • SECURITY FIX: Translate: HTML from messages was not escaped in Special:ManageMessageGroups. If you do not use this page (e.g. only use translatable wiki pages) you are not affected. (Phab:T242115)
wfLoadExtension( 'Translate' );
  • Removed deprecated and unmaintained SolrTTMServer. Recommendation is to migrate to ElasticSearch. (Phab:T87985)
  • Dropped support for HHVM.
  • 2019.04: https://translatewiki.net/mleb/MediaWikiLanguageExtensionBundle-2019.04.tar.bz2
    sha256sum: 5fbbd39acd1cc0e1edbd542a390daf1992d1526134ceb69248cdb4dced58f3a9 [1]
    Announcement and Release Notes
    • Compatible with MediaWiki 1.31, 1.32 and above and requires PHP 7.0.0 or above.
  • PHP entry point has been removed for CleanChanges and cldr. Warning will be displayed for deprecated PHP entry point. (T140007)
  • Fixed fatal error on PageContentLanguage hook subscriber (T214358)
  • Fixed broken Special:PageMigration (T217727)
  • Added support for newer versions of the Elastica extension while maintaining backward compatibility for older version REL 1.31 (T218100)
  • Added multiple new keyboard layouts in UniversalLanguageSelector.
  • 2019.01: https://translatewiki.net/mleb/MediaWikiLanguageExtensionBundle-2019.01.tar.bz2
    sha256sum: 39f2e946e360ac868744dc8e6f62cb5723447415bd11bcbb4911eb0f3674360c [1]
    Announcement and Release Notes
    • Compatible with MediaWiki 1.31, 1.32 and above and requires PHP 5.5.9 or above.
  • $wgTranslateCC is deprecated now. It should be replaced by TranslatePostInitGroups hook. (T212836)
  • Added proofreading to (Language|MessageGroup)Stats. The statistics table also has updated styling. (T41279)
  • Skipping messages Special:Translate's page mode no longer sometimes marks the translation proofread. (T206748)
  • Translatable subpages are no longer moved when moving parent. (T114592)
  • Message group stats updating was broken in multiple ways. (T134252, T208521)
  • Added multiple new keyboard layouts in UniversalLanguageSelector.
  • 2018.10: https://translatewiki.net/mleb/MediaWikiLanguageExtensionBundle-2018.10.tar.bz2
    sha256sum: c0a65956d4f8e49ba1b401372636b9575a5c17fbf2501fa14ff1c265dd778862 [1]
    Announcement and Release Notes
    • Compatible with MediaWiki 1.30, 1.31 and above and requires PHP 5.5.9 or above.
  • Updated cldr to version 34.0
  • LocalisationUpdates and UniversalLanguageSelector has removed PHP entry point. Please update your configuration!
  • Fixed an error in Translate that prevented Special:PageMigration from working.
  • UniversalLanguageSelector now supports UI language change when Global Preferences are present. (T198206)
  • UniversalLanguageSelector dropped support for discontinued freegeoip.net.
  • 2018.07: https://translatewiki.net/mleb/MediaWikiLanguageExtensionBundle-2018.07.tar.bz2
    sha256sum: 36aa80c78be6dcfb533f96dc25afdabd2fd4716452c1b5a6f2bc982def1af7bc [1]
    Announcement and Release Notes
    • Compatible with MediaWiki 1.30, 1.31 and above and requires PHP 5.5.9 or above.
  • Updated cldr to version 33.
  • Special:SupportedLanguages: List of authors is now sorted by the number of contributions.
  • Message keys coming from external files are now handled with more care and less likely to produce invalid or inaccessible pages. (T193023)
  • refresh-translatable-pages.php script can now use JobQueue, which is more efficient on wikis with thousands of translatable pages. (T195347)
  • Custom languages defined in $wgExtraLanguages now always appear in Special:Translate and Special:SearchTranslations. (T112889)

Show all releases.

Downloading com Git

No seu diretório de extensões faça o seguinte para obter ou atualizar a versão mais recente e siga as instruções de configuração abaixo.

 for ext in Babel cldr CleanChanges LocalisationUpdate Translate UniversalLanguageSelector
 do
   if [ ! -d "$ext" ]
   then
     git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/$ext.git
   fi
   cd $ext; git fetch --tags; git checkout 2021.07; cd ..
 done


Installation

Installation requirements

Installation requirements of each piece of provided software are included in the respective documentation. See in particular:

Add/update your LocalSettings.php

Near the end of LocalSettings.php, you have to place this configuration:

wfLoadExtension( 'Babel' );

wfLoadExtension( 'cldr' );

wfLoadExtension( 'CleanChanges' );
$wgCCTrailerFilter = true;
$wgCCUserFilter = false;
$wgDefaultUserOptions['usenewrc'] = 1;

wfLoadExtension( 'LocalisationUpdate' );
$wgLocalisationUpdateDirectory = "$IP/cache";

wfLoadExtension( 'Translate' );
$wgGroupPermissions['user']['translate'] = true;
$wgGroupPermissions['user']['translate-messagereview'] = true;
$wgGroupPermissions['user']['translate-groupreview'] = true;
$wgGroupPermissions['user']['translate-import'] = true;
$wgGroupPermissions['sysop']['pagetranslation'] = true;
$wgGroupPermissions['sysop']['translate-manage'] = true;
$wgTranslateDocumentationLanguageCode = 'qqq';
$wgExtraLanguageNames['qqq'] = 'Message documentation'; # No linguistic content. Used for documenting messages

wfLoadExtension( 'UniversalLanguageSelector' );

Update database tables

Command line

In the directory where your LocalSettings.php is located, run the following command:

php maintenance/update.php

Web browser

Go to example.com/mediawiki/mw-config/ (see Manual:Upgrading#Web browser) by using your domain and path and rerun install.

Configuring and using extensions

See the respective extension documentation pages. Do note that LocalisationUpdate does nothing by default and needs additional configuration to be run periodically.

Background

O PEIM não utiliza ramificações de extensões específicas de versão. It's a snapshot from master which is verified to be working with the specified MediaWiki releases. This means all MLEB extensions must follow the compatibility policy of supporting two latest stable MediaWiki releases in the master branch.

MLEB releases are created with a tool called Melange. If you are interested in that code (e.g. you want to change its code), see the Melange repository in Git.