Перекладні модулі

From mediawiki.org
This page is a translated version of the page Translatable modules and the translation is 49% complete.

Як ми можемо зробити переклад модулів Lua таким самим зручним, як переклад MediaWiki та розширень на translatewiki.net?

Це — початкова консультація щодо впровадження Перекладних модулів. Планується, що консультація буде відкрита для коментарів до кінця вересня 2020 року. Метою цього набору документів є розуміння потреб розробників та користувачів модулів Lua у вікі таким чином, щоб інформувати програмістів, які готуватимуть удосконалене рішення.

Вступ

Презентація перекладних модулів на мовному шоу, 2 вересня 2020
Презентація Перекладні модулі — найкращі робочі процеси для розробників вікі на Інтернет-зустрічі в Центральній та Східній Європі, 3 жовтня 2020

Перекладні модулі — це проєкт з визначення, впровадження, документування та розгортання інструмента для покращення можливості перекладу та спільного використання модулів. Мета полягає в тому, щоб рядки (повідомлення) користувальницького інтерфейсу в модулях Scribunto на багатомовних вікісайтах, таких як Вікідані та Вікісховище, легко локалізувалися подібно до ядра Медіавікі, розширень та перекладних сторінок.

The questions we have for the community members:

  1. Several options to organize the code and the messages are suggested. What would be the best way to organize the module code?
  2. Once this framework is developed and deployed, will it be convenient to develop new modules using this framework and perhaps to convert existing modules to using it?
  3. Which existing modules would you prioritize translating?

If you mostly edit articles and other wiki pages, your user experience won’t be affected significantly, but your feedback is nevertheless welcome.

If you are involved in maintaining templates or Scribunto modules or in administering translatable pages, your user experience may change significantly in doing these tasks, so your feedback is very important.

Передумови

All Wikimedia projects have key features implemented as either or both wikitext templates and Lua modules: hatnotes, infoboxes, welcome messages, formatted links and references, image descriptions and license information, coordinates, and many others.

These templates and modules are a form of code. This code is developed by skilled, experienced members of the editing communities, and implements features that the communities want, need, and now regularly use. Though most are individually simple, collectively they are comparable in their complexity, criticality, and ubiquity to the code of MediaWiki extensions. Unlike extensions, however, templates and modules don’t have a robust, stable, and consistent framework for internationalization and localization, even though many of them are used in multiple languages.

All MediaWiki extensions and MediaWiki core are localized on translatewiki.net, where volunteer translators can conveniently see what messages (strings) in which components need translation into their language, and can translate them, without dealing with any code beyond simple wikitext. To use translatewiki.net they only ever need to know basic wiki syntax. The translatewiki.net software also checks the translation for technical validity and provides tools for updating outdated translations, translation statistics, searching, filtering, etc.

Conversely, templates or modules don’t have anything like this. If they are translatable at all, this is done by editing wiki pages with complex wiki syntax or Lua code. This process is error-prone, less discoverable, and considerably more difficult. Some templates are translatable as pages using the Translate extensions, which makes their localization experience similar for translators to the experience of localizing extensions, but the framework for doing this is not consistent for the template and module developers.

It is therefore desirable to make it possible to translate the human-readable user interface messages of modules and templates using a process that is comparable to the process of translating MediaWiki core and extensions.

Сфера дії

Цей проєкт включає лише переклад повідомлень інтерфейсу користувача, що використовуються в модулях, і лише в межах однієї вікі. Особливо це стосується сайтів Вікімедіа, які вже є багатомовними: Вікісховище, Вікідані, Мета, mediawiki.org, Віківиди тощо.

Ця поточна пропозиція не стосується наступних питань:

  • Локалізація шаблонів. Як уже згадувалося вище, вона тісно пов’язана і, мабуть, також бажана, але вона залишена на пізніший етап. Технологія модулів (Scribunto) є більш автономною, на відміну від шаблонів, які тісно інтегровані з ядром MediaWiki і мають дещо інші вимоги до локалізації. However, the work on translatable modules should try to be forward compatible, so that whatever is done here will also be reusable for templates.
  • Локалізація назв модулів та ідентифікаторів функцій. Templates and their parameters usually have names in the content language of the wiki. Unlike templates, modules are usually invoked from templates and only rarely directly from content pages or discussion pages. It is therefore not necessary to allow their translation. This project only deals with the internationalization and localization of the messages that the modules show to the readers.
  • Локалізація гаджетів. Similarly to templates, gadgets should be conveniently localizable, but their technology is significantly different. It may be good to make it reusable, but it’s not the highest priority for this project.
  • Використання шаблонів та модулів у декількох вікі (“Глобальні шаблони”). This is desirable as well, and making modules robustly translatable will make the implementation of Global templates and modules much easier. This is not in the scope of the project described in this document, however. It makes sense to make modules translatable as one of the first steps towards global modules and templates, and the project should certainly try to be forward-compatible with global templates and modules, but it nevertheless stands on its own.
  • Перетворення даних. The conversion of digits (123 / ١٢٣ / १२३ / ၁၂၃), units (km / miles), script variants (Latin / Cyrillic Serbian, Simplified / Traditional Chinese, etc.), and so on are not a part of this project. These things are already handled by MediaWiki internationalization functions or by the code of modules and templates. Цей проєкт стосується лише повідомлень інтерфейсу користувача.

Більше інформації