Content translation/Templates/fa

ترجمه محتوا از ترجمه مقالات بین زبان‌ها پشتیبانی می‌کند و این شامل الگوها نیز می‌شود.

وقتی روی یک الگو در رابط ترجمه کلیک می‌کنید، یک برگه در نوار کناری نشان داده می‌شود. برگه نام الگوی منبع را نشان می‌دهد. اگر یک الگوی معادل در زبان مقصد با استفاده از یک پیوند بین زبانی به الگوی منبع متصل شده باشد، نام آن نیز نشان داده خواهد شد. اگر یک الگوی معادل پیدا نشود، برگه می‌گوید "در این زبان موجود نیست".

برگه گزینه‌های زیر را برای هر الگو نشان می‌دهد:


 * رد شدن از الگو
 * این چیزی را در مقاله ترجمه شده درج نمی‌کند. این زمانی مفید است که اطلاعات الگو در ترجمه مورد نیاز نباشد.


 * الگوی اصلی را نگه دار
 * این دستور ویکی الگوی اصلی را در مقاله ترجمه شده درج می‌کند. احتمالاً هنگام انتشار مقاله به درستی کار نمی‌کند و باید در نسخه‌های بعدی مقاله ویرایش شود، اما گاهی اوقات این راه آسان برای ترجمه است. (شما ممکن است بخواهید ابتدا چنین ترجمه‌ای را در فضای کاربری خود منتشر کنید، با تغییر عنوان ترجمه به "User:نام کاربری_خود/عنوان مقاله"، و سپس هنگامی که آماده شد، آن را به عنوان صحیح انتقال دهید.)


 * از الگوی معادل استفاده کن
 * این گزینه تنها در صورتی در دسترس است که یک الگوی معادل در دسترس باشد، و اجازه می‌دهد تا الگو را با زبان مقصد تطبیق دهید.

Adapting the template while translating
If an equivalent template is available, you can adapt it. Click the template again to open the template editor.

The template editor will show side-by-side all the parameters in the source and the target languages.

The value of the parameter from the source language will be automatically copied to the target language if the following conditions are true:


 * There is a parameter with an identical name.
 * There is a parameter for which an alias is defined in TemplateData with the same name as the parameter in the source language.

If a parameter cannot be found automatically in any of the ways listed above, the translator will have to find them and fill them one by one. Clicking a field in the template editor next to the source field will automatically fill the parameter value. The translator must select the appropriate parameter name from the "Select target field" drop-down list in the field. Note that the structure of template parameters in different languages is often not the same, and you have to write the parameters in a way that is correct in the wiki into which you are translating.

When you have filled all the parameters, close the translation editor. This will save your edits and show the template as it will appear after you publish the article.

گام به گام
For example, the translation of the infobox at the top of the article "Yoshida Castle" from English to Portuguese shows an example of translating a whole template:

اگر یک الگو قابل تطبیق نباشد چه باید کرد
If an equivalent template is not available in the target language, you will have to publish the translation without it. If a template is needed in the translated article, you will have to edit the translated article and add the template after publishing the first translated revision.

However, you can also go further and make future translation more efficient by making the templates in your language more similar to the templates in the languages from which you are translating. If you are uncomfortable with changing templates yourself, please tell somebody in your wiki who frequently maintains templates about the template that couldn't be translated, and point them to this page here.

ساخت الگوهای قابل ترجمه راحت تر
To make templates translatable more easily, please use these tips:

الگوداده
TemplateData is a technology for describing each template and its parameters in a precise and machine-readable way. It helps wiki editors who use the visual editor fill the template parameters, and the same data is used by Content Translation.


 * Create TemplateData for templates in your wiki.
 * Make sure that TemplateData is updated every time that the template itself is updated.
 * If the name of a parameter in your wiki is different from the name of the equivalent parameter in a wiki from which articles are frequently translated into your wiki, add an alias with that parameter. If you do this, the parameter value will be automatically pre-filled when translating.
 * For example, articles are frequently translated from English to Spanish. In an infobox that describes a city, the English name of a parameter may be "mayor", and the Spanish name may be "alcalde". In the Spanish template, define "alcalde" as the parameter name, and "mayor" as its alias.
 * For practical purposes, you don't have to define aliases that correspond to all languages, but only to those from articles are translated frequently. You can find which languages those are by looking at the page Special:CXStats at your wiki.
 * Give parameters clear, human-readable labels. A name is the name of the parameter that is inserted into the wiki syntax, and the label is what is shown to the editors in the template editing forms in the visual editor and in Content Translation.
 * Write descriptions for the parameters whenever possible.
 * Explain what is supposed to be the parameter's format: plain text, link, another template, a particular set of values, etc.
 * If a parameter can be filled automatically from Wikidata, note it in the description.

شبیه سازی بیشتر الگوها بین زبان‌ها
The parameters' structure is often different between different languages. For instance, in some languages images are provided as complete file links (for example, ) and others have separate parameters for file name, size, and caption. Making the parameter structure similar to the structure in the language from which articles are often translated will make the work considerably more efficient for translators and article maintainers.

Some templates are unbalanced, that is, one template begins a section by inserting some opening HTML tags or wiki syntax, and another templates ends the section by inserting the corresponding tags. For example, this is done in some languages for columns layout. Such templates are generally problematic, and they are especially hard to translate, and they can usually be replaced by a balanced template, which includes all the necessary syntax in itself.

ویکی‌داده
Make templates more Wikidata-enabled by making them pull parameter values from Wikidata. Such templates are becoming more and more common in some wikis, among them Russian, Estonian, Hebrew, Catalan, and others. When a parameter is pulled from Wikidata, it doesn't have to be filled by the article translators at all (although its label may have to be translated in Wikidata).

مشکلات شناخته‌شده
The template editor is a new feature in Content Translation, and some functionality is still missing. Here are some notable known issues:


 * Editing templates inside references is impossible (bug report)
 * The template parameters are saved only after the translator actively closes the template editor (bug report)

همچنین ببینید

 * Content translation/Templates support rewrite 2016 – notes about the development of the template editor
 * Content Translation improved template support development task management and design