Global templates/Taxonomy/he

זהו ניסיון לכתוב טקסונומיה פשוטה של תבניות המשמשות באתרי ויקי של ויקימדיה: למה משמשות תבניות ואיך ניתן לקבץ אותן.

יצירת רשימה מלאה של דברים שהתבניות משמשות בשבילם מאתגרת כי יש מאות אלפים מהן. הרשימה במסמך הזה רק תציג כמה משפחות נפוצות ובולטות של תבניות, אבל בגלל אופי הטכנולוגיה, היא לא יכולה להיות מקיפה באמת.

שיקול טכני מרכזי הוא שהמאגר המוצע של תבניות גלובליות יהיה שמיש עבור כל התבניות, לא משנה לאיזו "משפחה" הן שייכות (על בסיס הסכמה: לא תהיה כפייה לאחסם שום תבנית במאגר הגלובלי). התבניות הן למעשה הכלי היחיד שיש לעורכי ויקי להתאמה אישית יעילה של התוכן, ו"תוכן" כאן פירושו כל דבר שכתוב בדפי ויקי: ערכים אנציקלופדיים, דיונים, דפי מדיניות, דפי עזרה, מאמרי דעה, ספרים מתומללים, דפי משתמש, תרגומים וכל השאר. המאגר המוצע מיועד לכל התרחישים הללו.

עוד בעיה טכנית קטנה יחסית היא שבנוסף לתבניות, יש גם יחידות. הן דומות לתבניות, ומנקודת המבט של המשתמש, יש רק שני הבדלים משמעותיים ביניהן:


 * 1) התבניות כתובות בתחביר ויקי והיחידות כתובות בשפת התכנות לואה (Lua).
 * 2) התבניות מממושות כחלק מפלטפורמת הליבה של מדיה־ויקק, והיחידות ממומשות בהרחבה בשם Scribunto.

המסמך הזה מתייחס הן ליחידות והן לתבניות.

אלא אם צוין אחרת, הדוגמאות כאן מגיעות מוויקיפדיה האנגלית, אך חשוב לציין שזה לא אומר שהוויקיפדיה האנגלית היא ה"מקור" לכל התבניות או כל התוכן, או שהיא צריכה להפוך למקור כזה. זה נעשה פשוט מטעמי נוחות בהתחשב בשפה המקורית שבה כתוב הדף הזה. למעשה, יש חידושים טכניים רבים בפיתוח תבניות באתרי וויקי אחרים (ויקימילון, ויקישיתוך, ויקינתונים, ויקיחדשות וכו'), ובשפות רבות, במיוחד צרפתית, גרמנית, רוסית, ספרדית, קטלאנית, פולנית, עברית, פרסית, ערבית, סינית, וברבות אחרות. חלקם מוזכרים במיוחד במסמך הזה. 

מה תבניות אינן
אף שזה אפשרי טכנית, התבניות בדרך־כלל אינן משמשות לתוכן הטקסט של דפי ויקי. מדיניות הוויקיפדיה האנגלית לגבי תבניות אפילו אומרת למעלה: "בדרך כלל אין להשתמש בתבניות לאחסון טקסט של ערך".

תבניות מוטבעות לעיתים קרובות בפסקאות של טקסט של דפי ויקי, אבל זה נעשה בדרך־כלל רק עבור עיצוב מיוחד ולא עבור טקסט רגיל. 

טבלה מסכמת
כל שורה בטבלה מתוארת ביתר פירוט בפסקאות נוספות.

הערות שוליים


הערות שוליים כלליות
הערות שוליים "בסיסיות" מוכנסות באמצעות הרחבה בשם Cite, וזה עובד באופן שווה בכל השפות באמצעות תג  בתחביר ויקי. (אומנם האחידות הזאת בעיקר טובה, אבל היא גם בעייתית במובנים מסוימים. למשל, החובה להשתמש באותו תג  באתרי ויקי בשפות שכתובות מימין לשמאל גורמת לקשיים מסוימים; ר' . הבעיה הזאת נפרדת, אם כי הפתרונות המאולתרים הקיימים כוללות גם תבניות.)

התוכן האמיתי של רוב הציטוטים, לעומת זאת, מעוצב באמצעות תבניות. סגנון ציטוט דורש עיצוב אחיד. התבניות הבולטות ביותר של ויקיפדיה האנגלית מסוג זה הן Cite web, Cite book ו־Cite journal. ישנן עשרות תבניות נוספות, והן משמשות כמעט בכל הערכים.

חלק מהן יובאו לשפות רבות אחרות, אך השמות והפרמטרים שלהם אינם בהכרח זהים, כך שלא ניתן לעשות בהם שימוש חוזר באתרי ויקי אחרים באופן אמין ויעיל, מה שמקשה על התרגום. דיווחי באגים רבים על תרגום תוכן, למשל, עוסקים בתבניות.

הן גם לא קריאות למכונה, לפחות לא באופן פורטבילי: אפשר לפתח תוכנה לקריאת מטא־נתונים של ציטוטים מוויקיפדיה האנגלית, אבל יהיה צורך לשכתב אותם כמעט מאפס כדי לקרוא מטא־נתונים של ציטוטים מוויקיפדיה הצרפתית, ויקיפדיה הגרמנית, וכו'.



ציטוט מקורות מסוימים
התבניות האלו דומות לתבניות ציטוט כלליות, אך הן נעשות עבור מקורות מסוימים הדרושים בדפים רבים. דוגמאות באנגלית: Cite Catholic Encyclopedia, Britannica (לציטוט Encyclopædia Britannica).



ציטוט מובנה: Cite Q
דוגמה בולטת מסוימת לתבנית המציגה ציטוטים היא Cite Q. היא מנסה לשלב את הכוח של נתונים מובנים בוויקינתונים עם צורכי הציטוט של ויקיפדיה (בכמה שפות!), ומושכת את המידע על הציטוט מוויקינתונים. היא פותחה במיוחד לשימוש חוזר קל בשפות שונות, תוך מחשבה על העברה עתידית אפשרית למאגר תבניות גלובלי.



תשתיות של הערות שוליים
אלו הן תבניות ויחידות שאינן בשימוש ישיר על־ידי עורכי ערכים, אלא משמשות באופן פנימי בתבניות ציטוט אחרות כדי ליצור מראה מתוקנן. דוגמאות בולטות הן Module:Citation/CS1 ו־Module:Citation/CS1/COinS. היחידות האלו נידונות לעיתים קרובות כחלקי תשתית שאמורים להיות משותפים לכל אתרי הוויקי.



מטא־נתונים של דף
תבניות רבות מיישמות מטא־נתונים של ערכים. חלק מהן מופיעות במרחבי הערכים, ואחרות – במרחב השיחה. חלק מהן מוכנסות לערך, אך אינן מוצגות בפועל לקוראים.



סמלי מצב ערך
אלה הם בעיקר סמלים כגון Featured article, Good article וכו'. הם מוכנסים לקוד המקור של הערך, אך מוצגים בסרגל בחלק העליון של הדף. אף שהפונקציונליות דומה, העיצוב המיוחד והיישום הפנימי של התבנית הזאת עשויים להיות שונים בכל ויקי. תהליך "הערך המומלץ" הוא סימן לקהילת עורכים פעילה ואכפתית; היעדר תבנית כזאת הועלה כמה פעמים על־ידי עורכים באתרי ויקי קטנים יותר, אך מתפתחים בתור חסם לחיזוק קהילת העריכה המקומית.



מידע פנימי לעורכים
יש תבניות שאינן מוצגות לקוראים, אלא אמורות לשלוח מסרים ששימושיים לעורכים. למשל, בוויקיפדיה האנגלית יש תבניות שמיידעות את העורכים באיזה ניב של אנגלית יש להשתמש (Use American English, Use British English, Use Indian English, Use Nigerian English, וכו'), או על שימוש בתקן תאריך (למשל Use dmy dates).



מטא־נתונים בדפי שיחה
The Talk namespace was originally made for discussions about the article. Already in the mid-2000s, however, editors started also using it for storing metadata and maintenance templates for the editing community’s activities. A notable example is the English Wikipedia’s WikiProject templates, which sort articles by topics that are useful for experts in the editing community. For example, the talk page of the article Shanghai shows several such templates: WikiProject China, WikiProject Cities, WikiProject East Asia, WikiProject Politics, WikiProject Geography, and Wikipedia Version 1.0 Editorial Team.

This sorting was made by the English Wikipedia community to be used for its internal purposes, but it is so commonly used that it was used by the WMF Research team to sort articles into topics, and this sorting was subsequently applied to other languages and used for showing suggestions in the Growth extensions. While it has a useful result, this is also quite problematic because it forces the English Wikipedia community taxonomy on all the languages, without giving other communities a chance to influence it directly.

Similar WikiProject templates exist in Polish, Russian, Turkish, and other languages. People who edit wikis in multiple languages expressed interest in reusing this system, but importing it was too complicated for them.

Another notable example is notifying editors about important community decisions about controversial topics. For example, the notices about English Wikipedia Arbitration Committee sanctions on the talk page of Kosovo are inserted using the generic Mbox template.



מטא־נתונים של מדיה ורישיונות
Commons and all other Wikimedia wikis are strict about using correct copyright licenses, checking the sources of media files, and describing the files usefully. This has always been done by adding templates such as Information, cc-by-sa-3.0, artwork, and many others to the file information page. Some of this information is gradually being transitioned to the Structured Data on Commons infrastructure, but the process is far from completion.

תיבות מידע
This is one of the most notable examples of features implemented using templates.

There are hundreds of infobox templates in various wikis. Roughly, there are two types of those: There’s also a wide spectrum of templates in between the two extremes: they can pull information by default, or under certain circumstances (for example, only if the Wikidata statement has a reliable source), but also allow the adding of information using parameters.
 * 1) Manual infoboxes, which require the adding of each parameter in the wikitext of the article itself.
 * 2) Automated infoboxes, which provide the formatting, but pull the actual information from Wikidata.

The manual templates are more common in the English Wikipedia, although the usage of Wikidata-based ones is gradually increasing. The automated ones are common in Russian, Spanish, French, Hebrew, and many other languages.

There is huge demand for both types of infoboxes in smaller languages. In particular, this was brought by many editors in languages of Africa and the Philippines, but really from the whole world.



תבניות תחזוקה
Many templates are used to draw the readers’ and editors’ attention to issues of article tone, neutrality, reliability, completeness, and so on. They may apply to the whole page or to its part. In the English Wikipedia, they are sometimes known as “tags” or “hatnotes”.

Such templates often add the article to a category, for example, Articles needing additional references. Such categories are known as Backlogs: editors can go through them and continuously improve the wiki. In the larger Wikipedias, there may be dozens or even hundreds of such categories.

The impact of such templates has been the subject of research. For one example, see Templates and Trust-o-meters: Towards a widely deployable indicator of trust in Wikipedia by Andrew Kuznetsov, Margeigh Novotny, Jessica Klein, Diego Saez-Trumper, and Aniket Kittur. 

ערך שלם
Examples of maintenance templates that apply to the whole article:
 * Unreferenced: “This article does not cite any sources.”
 * Current: “This article documents a current event. Information may change rapidly as the event progresses, and initial news reports may be unreliable.”
 * Underlinked: “This article needs more links to other articles to help integrate it into the encyclopedia.”
 * Disputed: “This article's factual accuracy is disputed. Relevant discussion may be found on the talk page.”

Some of these are now used in the Growth extensions, for example. This is a nice integration with community workflows, but it also means that if a wiki wants to use the corresponding Growth feature, the template must exist and work in a way that is compatible with the extension, and this must be done in every wiki manually. If the template was global, this could be done effortlessly in all wikis.



חלקים של ערך
Perhaps the best known, iconic Wikipedia template is citation needed (for example, it is featured in the web comic XKCD: https://xkcd.com/285/). It’s used when some words in the article may be true, but there may be doubt about them and a reference should be added. It’s very common in the English Wikipedia, and in many other languages. In some languages, it’s also common to mark to which words exactly this template applies; it is possible in English, too, but it’s less common.

Visual Editor has some special support for this template: It can show an extra panel that shows the reason for the doubt, and a button for quick adding of a reference. This support is not universal, however: even if the template exists, this window must be configured manually on every wiki by writing a JSON file. A wiki that wants to use it must therefore create the template and the JSON file. This is a demonstration of how the lack of a global templates repository makes the development of WMF products inefficient.

This template is not just a signifier of doubt—it is a part of an editing workflow. Like some other maintenance templates, it adds the article to a backlog category categorized by date. Many editors go through these categories and improve these articles.

In addition to “citation needed”, there are other templates of this kind, such as clarify and who. For example, the English Wikipedia article Park Güell says (as of June 2022):

"On the other hand, many experts have tried to link the park to various symbols because of the complex iconography that Gaudí applied to the urban project."

The “[who?]” badge alerts the readers that this may be a “weasel word” and invites editors to add a specific citation.



תיבות ניווט
Navigation templates, also known in English as “navboxes”, appear in millions of Wikipedia articles. They usually include links to articles on a related topic, and are manually curated by editors. Because an encyclopedia covers thousands of topics and every navigation box has up to several dozens of links, there are thousands of navigation templates.

Navigation boxes are used for various topics. For example, a navigation article about a musician, such as Neil Young, may show a list of their albums, collaborators, side projects, and other related subjects.

Multiple navigation templates may appear in the same article. For example, the article Nancy Pelosi has Nancy Pelosi, a navigation box for topics directly related to Pelosi herself, as well as some others, grouped under “Links to related articles”: Democratic Party, US House Speakers, US House Leaders, US Order of Precedence, and more.

Navigation templates can appear in different locations in the article, but typically, they are used on one of these three locations:
 * 1) At the bottom of the article: common with articles about people or groups.
 * 2) In the beginning: common in more abstract topics, such as Psychology sidebar (for example, in Cognitive bias) or Islam (for example, in Hajj).
 * 3) In the middle: when a section in an article is related to another topic.

That said, practices may fluctuate in different topics and languages.

Such templates may include red links, which signify that the target of the red link is related to the theme and there is supposed to be an article about it, but the article was not written yet.

They appear not just in the English Wikipedia, but in many other languages. The aforementioned Neil Young navbox appears in seven other languages with similar content.

Navigation boxes are useful for both editors and readers, for topic organization and for getting information about related subjects. As of January 2023, however, they are completely hidden from mobile users because of the difficulty to adapt their styling to mobile screens. With the current technology, this adaptation is possible, but it would have to be made for each wiki separately. If, at least, there was the same basic implementation shared across wikis, this would only have to be done once. Many users have asked to show them on mobile screens, but this wasn’t done yet.



ניווט בערכים
These are templates that help people find information. Some examples:
 * Main: Used immediately after a section heading and shows a formatted link to another article that has expanded information about the subject of that section.
 * About and For: Shows a note at the top of the page and helps people find articles with similar names. For an example, see the article Georgia (country): at the top, it shows the text This article is about the Country of Georgia. For the US State, see Georgia (U.S. state). For other uses, see Georgia (disambiguation).
 * Sister project links: Usually appears towards the end of the article and shows links to pages related to the same topic in Commons, Wikibooks, Wikivoyage, etc.
 * Page navigation templates in Wikisource. For an example, see Chapter 6 of Alice’s Adventures in Wonderland: The light-green bar at the top shows links to the previous and next chapters, the table of contents, and the author.

As with other sections, there are hundreds of templates that have similar functionality. These are essentially navigation and search functions that would be useful in all languages because all languages have articles with homographic titles and links to related and enhanced articles, but with the current technology, they have to be created in every wiki separately.

<span id="General_formatting">

עיצוב כללי
Templates are used for various text and image formatting purposes, for example:
 * Blockquote: Quotations from books, poems, etc.
 * ISBN: Formatted ISBN with a link to information about a book.
 * Center: Show centered text.
 * Flex columns: Show text formatted as columns.
 * Image array: Shows a gallery of images. Similar to the  tag, which is built into the core MediaWiki platform, but with more features.

There are hundreds of other templates of this kind.

Important comments that apply to all of them:
 * Many of them are available in other wikis and not only in English, but there are some differences in implementation.
 * Unlike it is with built-in formatting tools such as bold font of section heading, it’s impossible to select some text and mark it as centered or as a book quote. The user has to cut the text, insert the template, and then paste the text as a parameter.
 * They are comparable to styles that are available in common word processors such as Microsoft Word and Google Docs, but none of them can be inserted using dedicated buttons in the Visual Editor toolbar. The user always has to know how the template name is written and then use the Insert → Template button and type the template manually. In theory, it would be possible to add some of them to the toolbar, but it would have to be done for each wiki separately.

<span id="Advanced_formatting_and_special_data_presentation">

עיצוב מתקדם והצגת נתונים מיוחדים
These templates are similar to text formatting, but usually show something more advanced.

דוגמאות אחדות:
 * Geographical maps: There are lots of different maps templates in different languages, some of which use OpenStreetMap, and some of which use templates that are custom-made by Wikipedians.
 * Railway maps: The Routemap template offers a special, complex, custom language for designing rail maps. They are used in thousands of articles about railways in multiple languages.
 * Coordinates: These are used in many languages to show the coordinates of places described in the articles. They are used not only for displaying the numbers, but also for showing “Nearby” articles in Wikipedia mobile apps, but this can only work in the wikis in which these templates work in a manner that the apps recognize, so someone has to manually maintain compatibility in each wiki.
 * IPA, Respell, and Lang: these are templates that show spelling and pronunciation of names, especially foreign ones, most often in parentheses in the first sentence.
 * Chess: Chess games are described using a precise language called Portable Game Notation (PGN). In some Wikipedias, there are templates that can get notation in this language and display a game. Interestingly, this is not available in the English Wikipedia, but can be found, for example, in the Hebrew Wikipedia article about Alexander Alekhine. Since late 2019, there has been an effort by several volunteers to rewrite this template as an extension (Extension:ChessBrowser) so that it will be usable everywhere, but it’s unclear whether it will be deployed.
 * Unit conversion, such as Convert: Templates that help easily show values of distance, mass, temperature, etc., in miles/km, kg/lb, F°/C°, and so on. Even though it may seem as if it’s useful mostly for Americans, they are used in many wikis.

Some advanced formatting and content types are implemented as MediaWiki extensions, for instance math and chemistry formulas, musical notation, Egyptian hieroglyphics, and timelines. This makes it possible to reuse them equally across all wikis and languages, and to insert and edit them using the Visual editor toolbar. There is nothing inherently different between Egyptian hieroglyphics and IPA, for example—both content types could be implemented as templates or as extensions, and they were implemented as they were for arbitrary historical reasons: The person who wanted to add Egyptian hieroglyphics support knew PHP and decided to do it that way, and the first person who wanted to add IPA did it using a template because it seemed simple.

ויקינתונים
Templates and modules wrapped in templates are essentially the only way to embed structured data from Wikidata into Wikipedia articles. The basic technology for inserting such data into wikis is the same everywhere, but the “out-of-the-box” data embedding capabilities are so rudimentary that all the wikis that actually do it developed their own ways.

In addition to the aforementioned Infoboxes and Cite Q, Wikidata is also used for many other things, such as showing semantic maps, Authority control for partners and linked data, etc.

Another example is showing data about sports competitions. In the articles about Tour de France 2018 in French, Latvian, and Japanese, the tables were inserted using the same short code, for example,. This was possible thanks to the efforts of volunteers in these languages to manually synchronize the code of the templates in each wiki. If there was a global templates repository, no manual coordination would be needed, and it would have to be done just once and usable in all languages.

User page
Various templates are often used on user pages. The small userboxes, of which there are thousands, are the most obvious example, and there are also notifications of activity (active, retired, taking a break, etc.), fancy personal formatting, etc.

One of the most commonly used templates across all Wikimedia projects is a template that indicates that a certain user page belongs to a bot account. Example: User:DatBot.

<span id="User_talk_page">

דף שיחת משתמש
Templates are frequently used on user talk pages. Some examples:
 * Archive boxes, pointing to old discussions.
 * Warnings, posted by administrators and other users, when a user makes an unconstructive edit (vandalism, unreferenced information, copyright violation, etc.)
 * Notifications about blocks.
 * Notifications about events, such as editathons, competitions, meetups, etc.

<span id="Community_discussion">

דיונים קהילתיים
Some community discussions use structures. Most notably:
 * Discussions about page deletion have special formatting achieved using templates.
 * Discussions about appointing users as administrators or receiving other permissions, have templates that help other users examine their contributions, deletions, blocks, etc.
 * In large wikis, arbitration committee discussions have a strict structure, some of which is enforced using templates. For an example, see Wikipedia:Arbitration/Requests/Case/Iranian politics.

ויקימילון
Wiktionaries heavily rely on templates to show grammatical information, conjugation tables, citations, gender and case declination, and so on. This creates a fairly nice presentation for readers, and indeed Wiktionary is Wikimedia’s most read project after Wikipedia. However, it makes Wiktionary quite difficult for editors to engage in because to make any contribution, one must learn how to use at least some templates, which tend to have cryptic names such as t+ (translation with superscript link), lb (label sense), ux (usage examples), der (derived etymology), etc.

And this is just in the English Wiktionary; other editions, such as French, Dutch, Russian, etc., all of which are quite successful with readers, have templates of their own, even though their functionality is mostly the same.

In addition to making Wiktionary hard to edit for novice editors, it also makes it very difficult to write software that processes it. Even if someone writes software that makes the English Wiktionary data machine-readable, it will have to be completely rewritten for the French Wiktionary, the Russian Wiktionary, etc.

<span id="Internal_infrastructure">

תשתית פנימית
Many templates and modules are usually not used directly in articles or discussion pages, but only in other templates and modules. They provide internal infrastructure functions for formatting, logic, data retrieval, etc. They are also sometimes known as “metatemplates”. Some of these are among the most frequently used templates in many wikis, even though normally, most content editors don’t use them directly.

Because of their importance for using other templates, many of them are copied to hundreds of wikis with very little or no change, and they are frequently proposed for globalization of some sort.

דוגמאות אחדות:
 * Icon: מספקת עיצוב אחיד של סמלים (icons) בתבניות שונות אחרות.
 * מספקת עיצוב אחיד של הודעות בראש הדף (ר' "תבניות תחזוקת ערך" לעיל).
 * יחידה:Arguments :היחידה המוכללת ביותר בוויקיפדיה האנגלית. מספקת עיבוד קל של ארגומנטים בקוד לואה.

סיכום
הדף הזה הוא רק "קצה הקרחון" של הדגמה למה משמשות תבניות. עולם התבניות של ויקימדיה עצום, וכאן ניתנו רק הדוגמאות הבולטות ביותר.

המטרה הסופית של הצעת התבניות הגלובליות היא להנגיש בנוחות כל תבנית שימושית לאתרי ויקי מרובים. זה יספק שוויון ביכולות טכניות, ועל־ידי זה – שוויון ידע, לדוברי כל השפות ולמשתתפים בכל מיזמי ויקימדיה.