Jump to content

Project:Terminology gadget/ru

From translatewiki.net
This page is a translated version of the page Project:Terminology gadget and the translation is 62% complete.
Как это выглядит, когда вы наводите курсор на термин, имеющий определение, заданное с помощью терминологического гаджета.

«Терминологический гаджет» позволяет переводчикам централизованно хранить переводы и примечания по использованию и отображать эти переводы и примечания по использованию переводчикам во время перевода. Термины, у которых есть определение, будут отображаться с другим цветом фона в исходном сообщении на английском языке, давая переводчикам визуальную подсказку о том, что на их языке существует определение этого термина.

По умолчанию гаджет включен для всех; если вы хотите отключить его на вкладке «Gadgets» у себя в персональных настройках.

Предыстория

The impetus for creating this gadget came from talks during the Arctic Knot Conference 2021, where some users mentioned the difficulty of translating certain terms into smaller languages. Some languages may not have words for certain technical terms that are used a lot in MediaWiki, like "file" or "category". Because of this, they may need to discuss what word they should use for those terms – and even if they come to a conclusion, the next person who translates wouldn't necessarily know what to use when translating the same term if they aren't aware of the previous discussion.

The need for consistent terminology isn't only limited to smaller languages, however. All languages can have multiple translations for the same terms in English, and staying consistent within the same context is always an advantage.

Как это работает

The gadget works on the English source messages, and scans them for terms that have been defined for the current language. If it finds any, it marks the term with a background color according to the legend. If you hover one of these terms, you will be shown the translation and, if they exist, the usage notes that have been defined for that term. You will also see a menu icon that you can click to edit the definition, or start a discussion about it.

When you add or edit a term, the definition will be saved to a subpage of your language's portal called terminology.json. See Portal:Nb/terminology.json and Portal:Sms/terminology.json for a couple of examples, or try this search for a full list of terminology pages. These JSON pages are not meant to be edited manually, but it's possible when absolutely necessary.

When editing the "translation" or "usage notes" field, you can use full wiki syntax – you can even use parser functions and templates if necessary.

"Языковое перенаправление"

It is possible to set an entire language code to redirect to another. This can be useful in cases of language variants where the terminology used should be shared between several variants. For example, the language codes de (German) and de-ch (Swiss German) should probably share the same terminology, so de-ch could be set as a redirect to de.

For languages with variant redirects, you can use the special "magic word" $VARIANT in the translation and usage notes field in the gadget, if you wish to show or highlight different things for different variants.

Click to show technical details.
Redirect language

In order to set a language as a redirect to another, its terminology.json page should look like this (in the JSON data page):

{
	"@redirect": "код целевого языка"
}
Пример $VARIANT

Let's say de-ch redirects to de. The translation for "file size" is "Dateigröße" in de and "Dateigrösse" in de-ch. In order to reflect this in the terminology gadget, you could do something like this (within the definition, usage notes or discussions about that term, using the MediaWiki syntax):

{{#switch:$VARIANT
| de-ch = Dateigrösse
| #default = Dateigröße
}}

This could be turned into a template for more efficiency, just remember to pass $VARIANT as a parameter to the template.

For some real-life examples, see how {{tgzh}} is used in Portal:Zh/terminology.json (which has the variants zh-hans, zh-hant, and zh-hk defined as redirects).

Other languages with variants defined as redirects include Portal:Es/terminology.json, Portal:Hu/terminology.json, and Portal:Nl/terminology.json for their “formal” or “informal” variants.

Most often, there's a default variant and sometimes there's no distinction with the base language because they are simple aliases. For example the variant Portal:De-formal/terminology.json is redirected to Portal:De/terminology.json, which does not distinguish that “formal” variant from the base language in its definitions and notes.

Условные обозначения

  • Term – для терминов, отмеченных таким образом, сохранен перевод на текущий язык.
  • Срок – к терминам, отмеченным таким образом, прилагаются примечания по использованию.
  • Термин – термины, помеченные таким образом, находятся в стадии обсуждения на странице обсуждения портала языка. К ним также могут быть приложены перевод и примечания по использованию.

Галерея


Исходный код

Исходный код гаджета находится по ссылке MediaWiki:Gadget-terminology.js, а некоторые дополнительные стили CSS — в MediaWiki:Gadget-terminology.css.

Обратная связь

Если у вас есть какие-либо отзывы, комментарии или сообщения об ошибках, связанные с работой гаджета, опубликуйте их на странице обсуждения.