Template:Fa:KeyDescription/doc

From OpenStreetMap Wiki
Jump to navigation Jump to search

exclamation mark

توجه: این الگو در صفحه‌های زیادی به کار رفته است. برای اینکه بار بسیار زیادی به کارسازها تحمیل نشود، تعداد ویرایش‌ها باید حداقل باشد.
لطفاً ابتدا تغییرات پیشنهادی را در صفحهٔ بحث به بحث بگذارید.
ویرایش یک الگو سبب می‌شود همهٔ صفحه‌هایی که از آن الگو استفاده می‌کنند بازتولید شوند. اگر آن الگو جاهای زیاد به کار رفته باشد، ویرایش شما می‌تواند بار سنگینی را به کارسازها تحمیل کند، زیرا سبب پرشدن صف کارها می‌شود. [آمار]

مقدمه

این الگو یک جعبهٔ اطلاعات تولید می‌کند که مناسب کلیدهاست. از دسامبر ۲۰۱۸، برای همهٔ صفحه‌هایی که از این الگو استفاده می‌کنند یک آیتم دادهٔ پشتیبان به‌وسیلهٔ بات یا به‌صورت دستی ساخته می‌شود. ربات بسیاری از پارامترهای الگو را به آیتم داده کپی می‌کند و آن‌ها را در قالبی مناسب خواندن ماشینی، ذخیره می‌کند.

این الگو بسیاری از پارامترهای ناموجود را از آیتم دادهٔ متناظر دریافت می‌کند (مانند key،‏ image،‏ description،‏ group،‏ status،‏ on* و ...)، در نتیجه، به‌لحاظ تئوری، بیشتر پارامترهای الگو را دیگر احتیاج نداریم؛ اما این پارامترها فعلا نباید حذف شوند، زیرا ابزارهایی مانند TagInfo مستقیماً از آیتم داده تغذیه نمی‌شوند، بلکه پارامترهای الگو را می‌خوانند. پس از آنکه TagInfo روزآمد شود، ایرادی ندارد پارامترها را حذف کنیم و در آن صورت فقط الگوی {{KeyDescription}} را بدون هیچ‌گونه پارامتری در صفحه‌های Key:* یا Lang:Key:* درج می‌کنیم و به‌طور خودکار مقادیر متناسب به زبان مناسب از آیتم داده نمایش می‌یابد (هنوز در سایر صفحه‌های key،‏ value و lang پارامترها لازم هستند).

برای نمایش یا ویرایش آیتم داده، روی مداد خاکستری که در کنار توضیحات قرار دارد کلیک کنید. همچنین می‌توانید روی OpenStreetMap Wiki item که در نوار کناری وجود دارد کلیک کنید. اگر توضیحات مندرج در آیتم داده با توضیحات مندرج در صفحهٔ ویکی فرق کند، یک مداد قرمز نیز برای ویرایش صفحهٔ ویکی خواهید دید. دو توضیح باید یکسان باشند. توضیح باید یک جملهٔ کامل یا بیشتر باشد (که با نقطه پایان می‌پذیرد) و حداکثر ۲۵۰ نماد در آن به کار برود. از زبان نشانه‌گذاری ویکی استفاده نکنید. برچسب (label) انگلیسی با خود کلید یکی باشد (معمولاً یک کلمه با حروف کوچک). هنگام ترجمه، حتماً شرح را وارد کنید اما برچسب‌ها اختیاری هستند. اگر برچسب موردنظر با برچسب انگلیسی یکسان است، آن را کپی نکنید. برخی زبان‌ها مایل‌اند کلید بومی را وارد کنند (نسخهٔ بومی کلید اصلی). در پایان، می‌توانید هر تعداد نام جایگزین برای کلید در ستون «همچنین شناخته می‌شود با» وارد کنید. برخی ابزارها به‌منظور پیشنهاد فوری هنگام جست‌وجوی کلید، از این جایگزین‌ها استفاده می‌کنند.

همهٔ منطق آیتم داده در کد لوآی Module:DescriptionFromDataItem قرار دارد.

کاربرد

Full parameter set in vertical format
Vertical list Prerequisites Brief instructions / notes
{{KeyDescription
| key           = 
| nativekey     = 
| image         = 
| image_caption =
| description   = 
| osmcarto-rendering      = 
| osmcarto-rendering-size = 
| group         = 
| website       = 
| url_pattern   = 
| onNode        = 
| onWay         = 
| onArea        = 
| onRelation    = 
| requires      = 
| implies       = 
| combination   = 
| seeAlso       = 
| wikidata      = 
| status        = 
| statuslink    = 
}}
 
 
 
 
image
 
 
rendered icon
 
 
website
 
 
 
 
 
 
 
 
 
 
status
 
 
 
The key name in native language
 
 
 
may not work if osmcarto-rendering-size is not set
usually 14
 
 
 
 
 
 
 
 
 
 
 
Qnnnn
 
 
  • If a field name is listed in the Prerequisites column it is a prerequisite for the field to the left.

پارامترها

The following parameters are recognised:

شرح عارضه

  • key: the key being described (required).
  • nativekey: the key name in native language.
  • image: the name of an image to be used to illustrate the feature (optional, a "no image" will be displayed if not specified).
  • image_caption: the description of the image used to illustrate the feature (optional).
  • description: a short description of the feature in question (required).
  • osmcarto-rendering: icon in the standard tile layer
  • osmcarto-rendering-size: size of the icon in pixels (usually 14)
  • group: the name of the broader group or category to which this feature belongs (optional).
  • website: the main website(s) associated with this feature (optional).
  • url_pattern: pattern to generate deep-link URLs for instances of this feature (optional).

کاربرد عارضه

The following parameters are optional. They are however recommended as their absence means that these uses have still not been decided or the use of the tag is still experimental.

  • onNode: yes if the feature being described is suitable for use on node elements, no otherwise.
  • onWay: yes if the feature being described is suitable for use on (unclosed) way elements, no otherwise.
  • onArea: yes if the feature being described is suitable for use on area elements, no otherwise.
  • onRelation: yes if the feature being described is suitable for use on (non-multipolygon) relation elements.

اطلاعات تکمیلی

  • requires: a list of tags which are necessary (often higher/lower in hierarchy) for this tag and must be set to give its actual meaning (optional).
  • implies: a list of tags/values which are assumed when absent; see below for examples; tag them explicitly for exceptions (optional).
  • combination: a list of additional tags which are useful in combination with this one (optional); see below for examples.
  • seeAlso: references to additional pages which may be of interest (optional).
  • wikidata: identifier (Qnnn) of data element used in Wikidata (optional); if not specified, a link to a Wikidata search tool will be displayed to find it.
  • status: the approval status of this feature (optional but recommended, the absence means "undefined"); possible values include:
    • abandoned: the approval process for this feature has been terminated before completion
    • approved: the feature has successfully competed the approval process
    • de facto: the tag is in widespread use, but no formal proposal process has taken place
    • deprecated: deprecated tags that will not be used anymore
    • discardable: a few features not carrying any meaning anymore like Tag:odbl=clean
    • draft: the feature has a draft proposal being written
    • in use: the feature is in use
    • obsolete: a feature which is no longer found in the database
    • proposed: the feature has been formally proposed
    • rejected: the feature was rejected during the approval process
    • <undefined or  (empty): unclear situation, a potentially abandoned draft of a proposal and some usage only
    • voting: the feature is currently being voted on as part of the approval process
  • statuslink: name of the proposal page, for linking (optional but should be set for approved/rejected status). Example.

پشتیبانی از زبان‌ها

  • lang: (optional) the BCP 47 language tag (most often based on a ISO 639-1 alpha-2 language code, or ISO 639-2 alpha-3 technical language code, or ISO 639-3 alpha-3 language code otherwise, possibly followed by script/region/variant subtags) for the language used to document this feature: this will generate aspects of the description box in the specified language, if translations are available. If a language code is not specified, the default will be determined from the full name of the current page using {{Langcode}}.

پارامترهای قالب‌دهی پیشرفته

These parameters can generally be ignored by the majority of users. They are available for fine-tuning the presentation of the description box, and are useful for including in examples, or embedding in tutorial pages.

  • class: specify the CSS class of the HTML table used to form the description box.
  • float: specify the CSS float value of the table: set to none to disable the standard right float.
  • style: the CSS style to be applied to the HTML table: overrides |float= if present.
  • languagelinks: set to no to inhibit links to corresponding pages in other languages (used for example on this documentation page).

نمونه‌ها

Note: In these examples, long lines have been wrapped for convenience. The advanced formatting parameters, class, float, style and languagelinks are not show, as their values are specific to use as examples.

{{KeyDescription
| key         = dessert
| image       = 
| description = A dessert is a sweet dish, typically served towards the end of a meal.
| group       = cuisine
| onNode      = yes
| onWay       = no
| onArea      =
| onRelation  = yes
| requires    =
| implies     =
* {{Tag|edible||yes}}
| combination =
* {{Tag|meal|dinner}}
* {{Tag|sweet||yes}}
| seeAlso     =
* {{Tag|dessert|cheesecake}}
* {{Tag|dessert|gateau}}
| wikidata    =
| status      = Imaginary
| lang        = en
}}
Public-images-osm logo.svg dessert
Description
A dessert is a sweet dish, typically served towards the end of a meal.
Group: cuisine
Used on these elements
may be used on nodesshould not be used on waysuse on areas unspecifiedmay be used on relations
Implies
Useful combination
See also
Status: imaginary
{{KeyDescription
| key         = shop
| image       = File:Geograph shop.jpg
| image_caption = Geograph shop.
| description = Место розничной торговли или оказания услуг.
| group       = shops
| onNode      = yes
| onWay       = no
| onArea      = yes
| onRelation  = no
| requires    =
| implies     = 
| combination =
* {{Tag|name}}
* {{Tag|opening_hours}}
| seeAlso     = 
| wikidata    = Q213441
| status      = de facto
| lang        = fa
}}
Public-images-osm logo.svg shop
Geograph shop.jpg
توضیحات
Место розничной торговли или оказания услуг. Edit this description in the wiki page. Edit this description in the data item.
گروه: shops
روی این عنصرها به‌کار می‌رود
استفاده در گره‌ها مجاز استنباید در راه‌ها استفاده شوداستفاده در ناحیه‌ها مجاز استنباید در رابطه‌ها استفاده شود
مقادیر مستند: 317
ترکیبات مفید
وضعیت: دفاکتوPage for proposal
{{KeyDescription
| key         = openplaques:id
| description = For plaques listed on OpenPlaques.org.
| website     = http://openplaques.org/
| url_pattern = http://openplaques.org/plaques/[value]
| group       = historic
| onNode      = yes
| onWay       = no
| onArea      = no
| requires    =
* {{Tag|memorial|plaque}}
| implies     =
* {{Tag|historic|memorial}}
| combination =
* {{Tag|name}}
| seeAlso     =
| status      = undefined
| lang        = en
}}
Public-images-osm logo.svg openplaques:id
Open Plaques.svg
Description
For plaques listed on OpenPlaques.org. Show/edit corresponding data item.
Group: historic
Website
http://openplaques.org/
URL pattern
http://openplaques.org/plaques/[value]
Used on these elements
may be used on nodesshould not be used on waysshould not be used on areasshould not be used on relations (except multipolygon relations)
Requires
Implies
Useful combination
Status: undefined

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